By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,144 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

XML Tree Structure

P: n/a
Hi Folks,

I would like to take a XML document and write its data into a tree structure
for a custom tree control. The document has two fields with one called task
(a text field) and the other called tree_level (an integer field). Consider
the document to be valid and well-formed. The tree_level is an index
describing where a node will reside in a tree structure. A partial view of
the XML document is as follows:

<task>summary task</task>
<tree_level>0</tree_level>
<task>task1</task>
<tree_level>1</tree_level>
<task>task2</task>
<tree_level>2</tree_level>
<task>task3</task>
<tree_level>2</tree_level>
<task>task4</task>
<tree_level>1</tree_level>
<task>task5</task>
<tree_level>0</tree_level>

The XML source document will pass the data into a XML target document that
might look as follows:

<node1>task1</node1>
<node2>task2
<node3>task3</node3>
<node4>task4</node4>
</node2>
<node5>task5</node5>
<node6>task 6</node6>

I own Stylus Studio but I am not sure if there is a way to code this using
the XML Dom.

Thanks for any guidance.
- Glenn


Aug 28 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Please substitute the following XML for the initial post. Thanks, Glenn

<task>summary task</task>
<tree_level>0</tree_level>
<task>task1</task>
<tree_level>1</tree_level>
<task>task2</task>
<tree_level>2</tree_level>
<task>task3</task>
<tree_level>2</tree_level>
<task>task4</task>
<tree_level>1</tree_level>
<task>task5</task>
<tree_level>1</tree_level>

The XML source document will pass the data into a XML target document that
might look as follows:

<node1>task1
<node2>task2
<node3>task3</node3>
<node4>task4</node4>
</node2>
<node5>task5</node5>
<node6>task 6</node6>
</node1>
"glenn" wrote:
Hi Folks,

I would like to take a XML document and write its data into a tree structure
for a custom tree control. The document has two fields with one called task
(a text field) and the other called tree_level (an integer field). Consider
the document to be valid and well-formed. The tree_level is an index
describing where a node will reside in a tree structure. A partial view of
the XML document is as follows:

<task>summary task</task>
<tree_level>0</tree_level>
<task>task1</task>
<tree_level>1</tree_level>
<task>task2</task>
<tree_level>2</tree_level>
<task>task3</task>
<tree_level>2</tree_level>
<task>task4</task>
<tree_level>1</tree_level>
<task>task5</task>
<tree_level>0</tree_level>

The XML source document will pass the data into a XML target document that
might look as follows:

<node1>task1</node1>
<node2>task2
<node3>task3</node3>
<node4>task4</node4>
</node2>
<node5>task5</node5>
<node6>task 6</node6>

I own Stylus Studio but I am not sure if there is a way to code this using
the XML Dom.

Thanks for any guidance.
- Glenn

Aug 28 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.