Share via


GetXMLAttr(string,string,string) function

 
Microsoft Office Live Communications Server 2005 with SP1

GetXMLAttr

The GetXMLAttr function takes an xml filename, an XPath string, and an attribute name, and returns the value of that attribute from the first matching node in the specified xml file. If the value is not found, the function returns null.

string GetXMLAttr(
  string XML,
  string XPath,
  string attribute
);

Parameters

  • XML
    A string containing the xml document to be parsed
  • XPath
    The path to be named in the XML parameter
  • attribute
    The name of the attribute whose value is to be returned

Return Values

Returns the value of the specified attribute from the first matching node in the specified xml file.

Remarks

The GetXMLAttr function is useful for reading portions of the SERVICE request, as well as the presence document maintained in the endpoint database.

The XPath parameter should be a simple string, without wildcards or attribute matching. The string must specify an absolute path to the desired attribute in the format "/A/B/C", where the leading forward slash (/) is mandatory, "A" represents the top-level node, and "B" and "C" represent zero or more child nodes. If the string does not begin with a forward slash, the function returns null.

  
  What did you think of this topic?
  © 2008 Microsoft Corporation. All rights reserved.