Adding new XML nodes...

G

Guest

Hello, below is a xml file which I’m working with. I want my result to be
like this

<group name="grp 4">
<report>
<name>MTIS_1</name>
</report>
<report>
<name>MTIS_1</name>
</report />
<report>
<name>MTIS_2</name>
</report>
</group>

but instead it came outlike this.

<group name="grp 4">
<report>
<name>MTIS_1</name>
<name>MTIS_1</name>
<name>MTIS_2</name>
</report>
<report />
<report />
</group>

what I want to do is, append the new attribute which is "name" into a new
report node, but instead, it keeps adding into an existing report node... how
can I overcome this problem whereby I want to add new attribute call "name"
into individual report node?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top