Generate xml and add it to existing xml

M

mike

Hi,

We have the following xml that needs to be generated for 200 users.



<wopi:createUser>
<typ:WOUser>
<typ:id>
<typ:serviceProviderId>AOne</typ:serviceProviderId>
<typ:companyId>Acme</typ:companyId>
<typ:userId>Alice</typ:userId>
</typ:id>
<typ:sipAddress>sip:[email protected]</typ:sipAddress>
<typ:firstName>Alice</typ:firstName>
<typ:lastName>Wonderland</typ:lastName>
</typ:WOUser>
</wopi:createUser>

ServiceProviderId and companyId will be the same but I need to
generate a user like:

user001
user002
user003

and so on...

So I will generate a <wopi:createUser>-Node for each user. Then I have
to add this into the existing xml document where we create the
serviceProvider and company.

I am using java 1.5 and I wonder if you have any advice to me in this
matter on how to implement it.
 
A

Arne Vajhøj

mike said:
So I will generate a <wopi:createUser>-Node for each user. Then I have
to add this into the existing xml document where we create the
serviceProvider and company.

For all practical purposes you can not add to an existing
XML document. You read the document, you add nodes and
you write a new document (possible with the same name).

Arne
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top