xmlTreeCopyAttributeList

 

SYNOPSIS

    xmlNode xmlTreeCopyAttributeList(xmlNode target,
                                     xmlNode attribute)

Parameters:

  • target - the xmlNode that will receive the attribute list

  • attribute - the first attribute in the list to be copied

Returns:

  • the first attribute in the newly created list on target


DESCRIPTION
xmlTreeCopyAttributeList() copies an attribute and all following attributes from their original to a new location. Note that the attributes may appear in a different order than they do in the XML source.

xmlTreeCopyAttributeList() is often used to copy all attributes from an element by using it in conjunction with xmlTreeGetFirstAttribute().


EXAMPLE

    <$newAttr = (xmlTreeCopyAttributeList($target, $attr))>


CAVEATS
The ordering of the attributes as provided by this function might NOT be the same as the ordering of the attributes in the XML document. This is legal, as the ordering of attributes is not significant in an XML document (see section 3.1 of the XML spec).


SEE ALSO
xmlTreeCopyDoc, xmlTreeCopyNode, xmlTreeCopyNodeList, xmlTreeCopyAttribute


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