The [xml_element->getattributenode] method returns the specified attribute from an xml_element.
The method returns an object of type xml_attr
xml_element->getattributenode( 'attribute_name' )
This example uses the [xml_element->getattributenode] method to return the attribute 'day' from the xml_element 'vacation'.
Code
var(vacationDays = xml('<vacation day="21" weekday="Friday" month="March">
<employee>Sean</employee>
</vacation>') )
var( myAttribute = $vacationDays->getattributenode('day') )
'myAttribute: '+$myAttribute+', is type '+$myAttribute->type
Result
myAttribute: day="23", is type xml_attr
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments