XML Schema文件,解释一下?

时间:2010-08-25 09:34:42

标签: xml xsd

这是我们在SharePoint中的一个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- XML中的“nsprefix,ns,ref,type”保留字吗?

3- xpath =“// ns0:eForm / descendant :: ns0:data [@ name ='FirstName']从数据库中获取名字。它是如何做到的?

谢谢,

艾哈迈德。

1 个答案:

答案 0 :(得分: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/