Lasso Soft Inc. > Home

[ xml_element->getattributenode ]

Method

The [xml_element->getattributenode] method returns the specified attribute from an xml_element.

The method returns an object of type xml_attr

  • Syntax
xml_element->getattributenode( 'attribute_name' )
Examples
  • Beginner

Get an attribue node from an xml_element

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

Recent Comments

No Comments found

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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft