2011-12-07 94 views
0

XML文檔關於屬性名稱

我有關於XML的問題問題的屬性從包含屬性的名稱,如description0的SharePoint到來,ows_x0020_long_desc在xmlDoc中來名

<z:row ows_LinkFilename="Aerospace Energy.jpg" 
    ows_Title="Aerospace" 
    ows_ContentType="Image" 
    ows__ModerationStatus="0" 
    ows_PreviewOnForm="Aerospace Energy.jpg" 
    ows_ThumbnailOnForm="Technology Experience/Aerospace Energy.jpg" 
    ows_Modified="2011-12-07 12:02:34" 
    ows_Editor="1073741823;#System Account" 
    ows_Description0="Honeywell's SmartPath® Ground-Based Augmentation System (GBAS), which offers airports improved efficiency and capacity, greater navigational accuracy, and fewer weather-related delays." 
    ows_ID="28" 
    ows_Created="2011-12-02 11:26:01" 
    ows_Author="1073741823;#System Account" 
    ows_FileSizeDisplay="6091" 
    ows_Mode="Energy" 
    ows_Solution="Business" 
    ows_Long_x0020_Desc="Honeywell's SmartTraffic™ and IntuVue® 3-D Weather Radar technologies make the skies safer and enable pilots to more efficiently route flights. SmartTraffic ." 
    ows_Brief_x0020_Desc="Honeywell's Required Navigation Performance (RNP) capabilities enable aircraft to fly more precise approaches through tight corridors and congested airports, leading to fewer delays." 
    ows_Tags="True" 
    ows__Level="1" 
    ows_UniqueId="28;#{928FDA3E-94FA-47A5-A9AD-B5D98C12C18C}" 
    ows_FSObjType="28;#0" 
    ows_Created_x0020_Date="28;#2011-12-02 11:26:01" 
    ows_ProgId="28;#" 
    ows_FileRef="28;#Technology Experience/Aerospace Energy.jpg" 
    ows_DocIcon="jpg" 
    ows_MetaInfo="28;#Solution:SW|Business vti_thumbnailexists:BW|true vti_parserversion:SR|14.0.0.4762 Category:SW|Enter Choice #1 Description0:LW|Honeywell's SmartPath® Ground-Based Augmentation System (GBAS), which offers airports improved efficiency and capacity, greater navigational accuracy, and fewer weather-related delays. vti_stickycachedpluggableparserprops:VX|wic_XResolution Subject vti_lastheight vti_title vti_lastwidth wic_YResolution oisimg_imageparsedversion vti_lastwidth:IW|294 vti_author:SR|SHAREPOINT\\system vti_previewexists:BW|true vti_modifiedby:SR|SHAREPOINT\\system Long Desc:LW|Honeywell's SmartTraffic™ and IntuVue® 3-D Weather Radar technologies make the skies safer and enable pilots to more efficiently route flights. SmartTraffic . Keywords:LW| vti_foldersubfolderitemcount:IR|0 vti_lastheight:IW|172 ContentTypeId:SW|0x0101009148F5A04DDD49CBA7127AADA5FB792B00AADE34325A8B49CDA8BB4DB53328F21400623D4FCEEB2ADC4EA8269BF873F0BB6F _Author:SW| vti_title:SW|Aerospace wic_System_Copyright:SW| Mode:SW|Energy Tags:SW|True wic_YResolution:DW|96.0000000000000 oisimg_imageparsedversion:IW|4 Brief Desc:LW|Honeywell's Required Navigation Performance (RNP) capabilities enable aircraft to fly more precise approaches through tight corridors and congested airports, leading to fewer delays. _Comments:LW| wic_XResolution:DW|96.0000000000000 Subject:SW|Aerospace vti_folderitemcount:IR|0" 
    ows_Last_x0020_Modified="28;#2011-12-07 12:02:34" 
    ows_owshiddenversion="6" 
    ows_FileLeafRef="28;#Aerospace Energy.jpg" 
    ows_PermMask="0x7fffffffffffffff" 
    xmlns:z="#RowsetSchema" /> 

請你告訴解決方案。

+0

所以你有什麼問題? –

回答

3

的SharePoint當XML返回的數據將一直使用此fromat。

  • 字段名稱將通過將用於不顯示的名稱字段的ows_
  • 內部名稱預先考慮。在SharePoint
  • 內部字段名稱包含Unicode當量的特殊字符
    例如如果您從SharePoint用戶界面創建一個字段名爲「字段名稱」, SharePoint將創建內部名稱爲「Field_x0020_Name」 其中0020的空間Unicode表示。

    如果通過代碼或功能,但是你可以指定自己的內部和顯示名稱創建的字段。

所以,如果你解析這樣的XML,你將不得不記住這些規則。


的SharePoint並不在現場的內部名稱添加x0020轉義序列,除非是在顯示名稱空間,同時創建從UI領域。 此外,一旦創建該字段,更改顯示名稱不會影響字段的內部名稱。 因此,如果您從UI創建一個字段'Long Desc',稍後將名稱更改爲'LongDesc',則內部名稱仍將是Long_x0020_Desc。

+1

很好的答案。你還應該提到的是x0020簡直是空格字符的Unicode表示:http://www.fileformat.info/info/unicode/char/20/index.htm –

+0

感謝您指出了這一點,我錯誤地寫了十六進制,而不是的unicode如此糾正它 – justforkix09