2010-08-25 35 views
0

這是SharePoint我們的XML文件中的一部分:XML架構文件,解釋一下嗎?

<BuildManifest nsprefix ="ns0" ns="http://tempuri.org/Eform_Schema.xsd" version="1.1"> 
     <IdentifyInputParameters> 
     <BusinessObject ref="Request1" type="RequestProcessing_BL.Request" /> 
     </IdentifyInputParameters> 

     <Metadata> 
     <Source ref="ThisForm" reflectionPath=".FormURL" /> 
     <Destination xpath="//ns0:eForm" attribute="formURL"> 
     </Destination> 
     </Metadata> 

     <Populate> 
     <Source ref ="Request1" reflectionPath=".RequestTypeGroupDisplayName" /> 
     <Destination xpath="//ns0:eForm/descendant::ns0:data[@name='FirstName']"></Destination> 
     </Populate> 

我的問題:

1的Eform_Schema.xsd文件是在SharePoint的根目錄。如何命令ns =「http://tempuri.org/Eform_Schema.xsd」可以達到它?

2-是否在nsprefix,ns,ref,type中保留字?

3-的XPath =「// NS0:電子表格/後裔:: NS0:?數據[@名稱= '名字']從數據庫中它是怎麼做的

由於獲取第一個名稱,

艾哈邁德。

回答

0

1的Eform_Schema.xsd文件是在SharePoint的根目錄下。如何命令NS = 「http://tempuri.org/Eform_Schema.xsd」 能達到呢?It's up to SharePoint's parsing algorithm that does that.

2- XML中是否有「nsprefix,ns,ref,type」保留字?No. They are just normal attributes of your XML Node.

3- xpath =「// ns0:eForm/descendant :: ns0:data [@ name ='FirstName']從數據庫中獲取名字。它是如何做到的? It uses xPath. this is a selector for XML documents.

要了解更多的XPath:http://www.w3schools.com/xpath/

+0

感謝sheeks06你的答案。 艾哈邁德。 – Ahmed 2010-08-29 05:26:01