Writing and Reading from a XML file

How do I update a XML file and then parse it using DOM parser taking into consideration the following points1. Well-formedness of the XML2. Storing the Oracle database data into the xml using XQuery API for JavaRgds,Seetesh
[258 byte] By [seteshhindlea] at [2007-10-2 12:09:08]
# 1

About the welformedness of the XML File, perhaps you could include the DTD of the XML File in the document,sth like

<!DOCTYPE foo SYSTEM foo.dtd>

then set your DOM Parser Factory to be validating e.g

factory=DocumentBuilderFactory.newInstance();

factory.setValidating(true);

Hope it helps

Ken

waNgethaa at 2007-7-13 8:47:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
How do I create the DTD on the fly if I have an external DTD to be added to the existing xml created in the first instance?
seteshhindlea at 2007-7-13 8:47:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
How do I create the DTD on the fly if I have an external DTD to be added to the existing xml created in the first instance?
seteshhindlea at 2007-7-13 8:47:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
How do I breakup one large XML into multiple small XML checking for its well-formedness using Java ?
seteshhindlea at 2007-7-13 8:47:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5

Code snippet

===========

OutputFormat outputFormat = new OutputFormat("XML","ISO-8859-1",true);

.......

outputFormat.setDoctype(null,"emp.dtd")

It adds the DOCTYPE element but doesnt create the .DTD file.

<!DOCTYPE ROOT_EL SYSTEM "emp.dtd">

Any ideas?

Rgds,

Seetesh

seteshhindlea at 2007-7-13 8:47:03 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...