【问题标题】:Format SharePoint's <properties> node as list将 SharePoint 的 <properties> 节点格式化为列表
【发布时间】:2015-06-30 03:22:24
【问题描述】:

SharePoint 2010 的 listdata.srv 服务返回给定选项列表的 Atom 提要:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<entry xml:base="http://apps/Requests/_vti_bin/listdata.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schem as.microsoft.com/ado/2007/08/dataservices/metadata" m:etag="W/&quot;28&quot;" xmlns="http://www.w3.org/2005/Atom">
...
  <content type="application/xml">
    <m:properties>
      ...
      <d:Name>Last, First</d:Name>
      <d:WorkEMail>first.last@domain</d:WorkEMail>
      ...
    </m:properties>
  </content>
</entry>

我想要一种快速的方法来在列表中显示/entry/content/properties 节点中的所有节点。

我试过了:

PS> Get-Url "http://apps/Requests/_vti_bin/listdata.svc/List(1234)/Requestor" | Format-List -Property entry.content.properties

但这不会返回值。

这可行,但我想避免临时变量分配步骤:

    [xml]$xml = Get-Url "http://apps/Requests/_vti_bin/listdata.svc/List(1234)/Requestor"
    $xml.entry.content.properties

正确的语法是什么?

【问题讨论】:

    标签: powershell sharepoint sharepoint-2010 powershell-2.0


    【解决方案1】:

    这个呢? ([xml](Get-Url "...")).entry.content.properties

    【讨论】:

      猜你喜欢
      • 2012-11-11
      • 1970-01-01
      • 2018-12-07
      • 1970-01-01
      • 2010-09-15
      • 1970-01-01
      • 1970-01-01
      • 2016-12-26
      • 2010-10-16
      相关资源
      最近更新 更多