Issue regarding the Attribute Names

后端 未结 1 953
花落未央
花落未央 2021-01-27 08:38

Xml Document

I am having a problem regarding the xml attribute names coming from sharepoint which contains the attributes names like description0,ows_x0020_long_desc com

1条回答
  •  一整个雨季
    2021-01-27 09:13

    SharePoint when returning data in xml will always use this fromat.

    • Field names will be prepended by ows_
    • Internal names of field will be used not display names.
    • Internal field names in SharePoint contain unicode equivalents for special characters
      e.g. if you create a field with name 'Field Name' from SharePoint UI, SharePoint will create internal name as 'Field_x0020_Name' where 0020 is unicode representation of space.

      If fields are created by code or feature however you can specify your own internal and display names.

    So if you are parsing such xml you will have to code remembering these rules.


    SharePoint does not add x0020 escape sequence in field's internal name unless there is a space in the display name while creating the field from UI. Also once the field is created, changing the display name has no effect on the internal name of a field. So if you create a field 'Long Desc' from UI and the later change the name to 'LongDesc', the internal name will still be Long_x0020_Desc.

    0 讨论(0)
提交回复
热议问题