Getting a user set of a group

Source: Internet
Author: User
Tags xslt

Basic principle: Use the WebService GetUserCollectionFromGroup provided by SharePoint to obtain the user set in the group based on the specified group name.

Processing Process:

The output XML snippet is

 

The XSLT segment is:

Code

 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://schemas.microsoft.com/sharepoint/soap/directory/">    
<xsl:template match="/">
<xsl:for-each select="xml/h:GetGroupCollectionFromUser/h:Groups/h:Group"> <xsl:value-of select="@Name"/>;</xsl:for-each> </xsl:template>
</xsl:stylesheet>

Output result:

Lui, Mingle (Microsoft); Mingle, Lu (Microsoft );

If XSLT uses the following

 

 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://schemas.microsoft.com/sharepoint/soap/directory/">
<xsl:template match="/">
<xsl:value-of select="xml/h:GetUserCollectionFromGroup/h:Users/h:User/@Name"/>
</xsl:template></xsl:stylesheet>

 

 

The output result is the first record of the XML Element User:

Lui, Mingle (Microsoft)

 

 

Code

 <xml>
<GetUserCollectionFromGroup xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/">
<Users>
<User ID="14" Sid="S-1-5-21-1178368992-402679808-390482200-577565" Name="Lui, Mingle(Microsoft)" LoginName="Microsoft\00168" Email="Mingle.Lui@hotmail.com" Notes="" IsSiteAdmin="True" IsDomainGroup="False" />
<User ID="10" Sid="S-1-5-21-1178368992-402679808-390482200-423316" Name="Mingle.Lu(Microsoft)" LoginName="Microsoft\00169" Email="Mingle.Lui@live.com" Notes="" IsSiteAdmin="True" IsDomainGroup="False" />
</Users></GetUserCollectionFromGroup>
</xml>

Process File download: download

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.