How To - get XML node name
Posted: Mon Oct 28, 2013 10:28 pm
Greetings Everyone,
I'm having a little trouble with a script I'm doing that work with XML trees.
I'm trying to get all the nodes from the XML tree (in memory) and add them to a dataArray to put on a datagrid form.
I'm using a loop with the revXMLFirstChild(...) and revXMLNextSibling(...) to iterate through the nodes and get the data I need.
However, one of the attributes need to add to the array is the node name.
Using the revXMLFirstChild(...) and revXMLNextSibling(...) functions the result is something like this: "/tokens/single[1]"
so, the information I need to set is only the "single".
I tried to search around for some function or way to do it but had no luck with it.
Anyone has any idea on how can I do this?
Many thanks ins advance,
- Miguel
I'm having a little trouble with a script I'm doing that work with XML trees.
I'm trying to get all the nodes from the XML tree (in memory) and add them to a dataArray to put on a datagrid form.
I'm using a loop with the revXMLFirstChild(...) and revXMLNextSibling(...) to iterate through the nodes and get the data I need.
However, one of the attributes need to add to the array is the node name.
Using the revXMLFirstChild(...) and revXMLNextSibling(...) functions the result is something like this: "/tokens/single[1]"
so, the information I need to set is only the "single".
I tried to search around for some function or way to do it but had no luck with it.
Anyone has any idea on how can I do this?
Many thanks ins advance,
- Miguel