Click to See Complete Forum and Search --> : writing xml using java


webgenie
06-11-2009, 02:24 AM
i have a pre generated xml document and need to write into it using java. for example, the xml file i have is

<address-book>
<person name = "abc" number = "123">
</person>
</address-book>

How do I add more persons in the above schema using Java? Is there an API which can help in doing this?

Also, in case I want to express one of the values as null like,
<person name = null >

How is this done? using quotations and null within just initialises the name as "null".

Please help.

Thank you.

jkmyoung
06-11-2009, 11:10 AM
This really depends on the code of the app that receives your xml. Without knowledge of that we cannot say.