xmlTreeGetAttributes

 

SYNOPSIS

    xmlNode[] xmlTreeGetAttributes(xmlNode element [, string name
                                [, string ns_URI] ])

Parameters:

  • element - the element to get the attribute(s) from

  • name (optional) - the name of the attribute to get. If not specified, all attributes are returned.

  • ns_URI (optional) - limit result to the attributes in the namespace ns_URI. If not specified, namespace is ignored.

Returns:

  • the xmlNode(s) of the attribute(s) requested


DESCRIPTION
xmlTreeGetAttributes() returns the attributes of an element. If a name is specified, then only the attribute matching that name is returned (if it exists).

If no ns_URI is specified, then the namespace prefix/URIs are disregarded and only local names are compared. If a ns_URI is provided, only an attribute that matches a name and the namespace URI will be returned. This includes the empty namespace; if you pass in a ns_URI as '', then only the attribute matching that name and without a namespace will be returned.


EXAMPLE

    <$stockAttr = (xmlTreeGetAttributes($node, 'stock'))>


SEE ALSO
xmlTreeGetFirstAttribute


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.