【发布时间】:2014-05-02 09:26:44
【问题描述】:
我正在使用 REST API 从 SharePoint 网站中提取列表项。我收到的 XML 包含超过 1 个命名空间。我正在使用 XSLT 文件清除这些内容。但是,由于返回的 xml 格式为:
<?xml version="1.0" encoding="utf-8" ?>
<feed xml:base="https://thomasmorestudent17.sharepoint.com/sites/devtest/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>b82076e4-3e36-4b09-bbed-3d14e0bf948f</id>
<title />
<updated>2014-03-19T10:21:14Z</updated>
<entry>
<id>https://thomasmorestudent17.sharepoint.com/sites/devtest/_api/Web/Lists(guid'ab8811c5-0d39-457c-8fd1-c15a45c78f89')/files('Aanleiding en achtergrond van het project.docx')</id>
<category term="MS.FileServices.File" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="Web/Lists(guid'ab8811c5-0d39-457c-8fd1-c15a45c78f89')/files('Aanleiding%20en%20achtergrond%20van%20het%20project.docx')" />
<title />
<updated>2014-03-19T10:21:14Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:CreatedBy m:type="MS.FileServices.UserInformation">
<d:Id>9</d:Id>
<d:Name>Thomas More</d:Name>
</d:CreatedBy>
<d:ETag>"{ECAEE072-FEDD-4FF6-8A27-1EFF131B0064},1"</d:ETag>
<d:Id>Aanleiding en achtergrond van het project.docx</d:Id>
<d:LastModifiedBy m:type="MS.FileServices.UserInformation">
<d:Id>9</d:Id>
<d:Name>Thomas More</d:Name>
</d:LastModifiedBy>
<d:Name>Aanleiding en achtergrond van het project.docx</d:Name>
<d:Size m:type="Edm.Int32">21616</d:Size>
<d:TimeCreated m:type="Edm.DateTime">2014-03-14T17:24:25Z</d:TimeCreated>
<d:TimeLastModified m:type="Edm.DateTime">2014-03-14T17:24:25Z</d:TimeLastModified>
<d:Url>/sites/devtest/Shared Documents/Aanleiding en achtergrond van het project.docx</d:Url>
</m:properties>
如何使用它以便可以使用 C#.net 将值输入到 SQL 中?
【问题讨论】:
标签: c# xml rest sharepoint ssis