G
Ghislain Mary
Hi all,
I'd like to know how you would search for all the paths of an XML
document using REXML. For example, let say that the document is the
following:
<document>
<content>a simple sample</content>
<node>
<content>some text</content>
</node>
<node>
<foo>
<content>an other sample</content>
</foo>
</node>
</document>
What I'd like to have is an Array like this:
[['content'],
['node'],
['node', 'content'],
['node', 'foo'],
['node', 'foo', 'content']]
Any ideas ?
Thanks,
Ghislain
I'd like to know how you would search for all the paths of an XML
document using REXML. For example, let say that the document is the
following:
<document>
<content>a simple sample</content>
<node>
<content>some text</content>
</node>
<node>
<foo>
<content>an other sample</content>
</foo>
</node>
</document>
What I'd like to have is an Array like this:
[['content'],
['node'],
['node', 'content'],
['node', 'foo'],
['node', 'foo', 'content']]
Any ideas ?
Thanks,
Ghislain