J
John Underwood
Hi.. I'm look for suggestions in handling the following.. In the xml
below, I read
that in and add it to a tree.. Just reading it in it puts it in the
following format:
Companies
Company
New
Stuff 1
New
Stuff 2
Company
New
Stuff 3
New
Stuff 4
I'd like to combine Nodes that are similiar under a node.. Like this:
Companies
Company
New
Stuff 1
Stuff 2
Company
New
Stuff 3
Stuff 4
OR:
Companies
Company
New
Stuff 1
Stuff 2
Stuff 3
Stuff 4
Is this best way to handle this to loop through nodes to see if that
node exists, and if so add to that node? Or would there be a better
way to write my xml? I'm just look ing for suggestions of how people
normally handle this sort of thing...
thanks...
John
<?xml version="1.0" encoding="utf-8" ?>
<companies>
<company>
<new value="someValue">stuff 1</new>
<new value="someValue">stuff 2</new>
</company>
<company>
<new value="someValue">stuff 3</new>
<new value="someValue">stuff 4</new>
</company>
</companies>
below, I read
that in and add it to a tree.. Just reading it in it puts it in the
following format:
Companies
Company
New
Stuff 1
New
Stuff 2
Company
New
Stuff 3
New
Stuff 4
I'd like to combine Nodes that are similiar under a node.. Like this:
Companies
Company
New
Stuff 1
Stuff 2
Company
New
Stuff 3
Stuff 4
OR:
Companies
Company
New
Stuff 1
Stuff 2
Stuff 3
Stuff 4
Is this best way to handle this to loop through nodes to see if that
node exists, and if so add to that node? Or would there be a better
way to write my xml? I'm just look ing for suggestions of how people
normally handle this sort of thing...
thanks...
John
<?xml version="1.0" encoding="utf-8" ?>
<companies>
<company>
<new value="someValue">stuff 1</new>
<new value="someValue">stuff 2</new>
</company>
<company>
<new value="someValue">stuff 3</new>
<new value="someValue">stuff 4</new>
</company>
</companies>