I am using SharePoint webservice to retrieve content type from the site. The output looks like this:
<ContentTypes ContentTypeOrder="0x010300971A94A609AC5F4390A1FF87A26CD05D" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<ContentType Name="Issue" ID="0x010300971A94A609AC5F4390A1FF87A26CD05D"
Description="Track an issue or problem."
Scope="https://practiv1.sharepoint.com/devtest/Lists/issueTracking"
Version="0"
BestMatch="TRUE">
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>
<ContentType Name="Folder"
ID="0x01200049A00CD1A9F3944A9AE7BCCAC15B02D4"
Description="Create a new folder."
Scope="https://practiv1.sharepoint.com/devtest/Lists/issueTracking"
Version="0">
<XmlDocuments>
<XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
<Display>ListForm</Display>
<Edit>ListForm</Edit>
<New>ListForm</New>
</FormTemplates>
</XmlDocument>
</XmlDocuments>
</ContentType>
I want to use xpath to retrieve items. But I used the path like "//ContentType" or "/ContentTypes/ContentType", I couldn't find anything :
var listService = new ListWebService.Lists();
listService.Url = "xxx.sharepoint.com/xxx/_vti_bin/Lists.asmx";
var contents = listService.GetListContentTypes("issueTracking", "0x01");
Can someone help me what wrong with my xpath?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…