xmlTreeGetFirstAttribute

SYNOPSIS

xmlNode xmlTreeGetFirstAttribute(xmlNode element)

Parameters:

  • element - the element you want to get the first attribute of

Returns:

  • the first attribute of element


DESCRIPTION
xmlTreeGetFirstAttribute() returns the first attribute of the element element.

Note that this returns the xmlNode of the attribute, not the text of it. With the xmlNode of the attribute, you can use things like xmlTreeGetName(), xmlTreeGetContent(), xmlTreeGetNext(), etc.

If you only want the content of a certain attribute, you can use xmlTreeGetAttributeContent() directly on the element instead.


EXAMPLE

<$attr = (xmlTreeGetFirstAttribute($element))>


SEE ALSO
xmlTreeGetChildren, xmlTreeGetFirstChild, xmlTreeGetNext, xmlTreeGetPrevious, xmlTreeGetParent, xmlTreeGetAttributes


Copyright © Thunderstone Software     Last updated: Oct 24 2023
Copyright © 2024 Thunderstone Software LLC. All rights reserved.