on 08-06-2007 3:50 AM
Just a question for everyone...
is it possible to implement a depth first search algorithm in xMII..? The reason is to process an XML document which represents data in a tree format.
eg
<Hierarchy>
<Location/>
<Location/>
<Location/>
</Hierarchy>
(think of it as how windows explorer shows its folder listing... its a tree view and you can see subfolders as child nodes..)
and convert it to an xMII XML doc:
Hierarchy Location1 Location2 Location3
format...ie. I wanted to traverse the tree and flatten it into a table format.
ahh did this make sense?
I've been playing around with my XPath and Repeater blocks but I'm not making much headway.. Has anyone done something similar?
I am not sure on DFS but for a start lets assume you have an xml loader action to get the content of your xml file then to look inside each of the location(s) a correct XPath expression could be
XmlLoader_0.XmlContent{/Hierarchy/Location[1]}.
You can repeat it for Location[2] and so on.
or better still just repeat on /Hierarchy/Location. But I guess the problem would be if a particular <Location> have further child nodes and the child have further children and so on..
If you could post a sample xml that you are working on,it'll help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.