|
|
[xml_tree]Description
->atts - Returns a map of the attributes for the current node, instead of an array of pairs. ->attribute(string) - Returns the value of the given attribute for the current node. ->nodename(index) - Returns the given child node by name. If there are multiple nodes of the same name, you can return a specific node by passing an index. If no matching child nodes are found, it will look for an attribute by that name. ->getnode(string) - Same as ->nodename above. Useful if the node name conflicts with an existing member tag, such as "name." ->getnodes - Returns the children of the current node, minus the empty ones that ->children generates on its own. Parametersnone Sample Usage
Source CodeClick the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
Related Tags
Comments
06/01/2006, Jason Huck
Update The _unknowntag callback now searches for matching attributes if no matching child nodes are found.
05/30/2006, Jason Huck
Updates Added ->getnodes member tag and made more things return via reference.
05/17/2006, Jason Huck
Added ->getnode() member tag. You can now use ->getnode() to access nodes with otherwise conflicting names.
05/08/2006, Jason Huck
Bug Fix Added error trapping on ->attribute member tag. |
|||||||||||||||||||
Update
Modified ->getnode() member tag to use an XPath expression instead of ->children for better performance/memory management, per a suggestion by Kyle Jessup.