Forums Register Login

Can we generate a XML from XSD using SAX

+Pie Number of slices to send: Send
Pls help me in exploring the SAX parser, and do tell me whether we can generate a XML file from a XML schema using SAX like we do using DOM and castor objects, or is SAX just used for the sole purpose of parsing
+Pie Number of slices to send: Send
You can generate a stream of events that mimic the output of a SAX parser and use them to create XML documents.
I know of no way to automatically use XSD, that requires programming on your part to combine your data with the XSD structure information.

I did this article on "pipeline" processing of SAX events.
There are some tricky concepts here. Fortunately, Elliot Rusty Harold has placed this chapter from his big XML book online. Read that first.

Bill
+Pie Number of slices to send: Send
"Bhavin B P",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1164 times.
Similar Threads
java to xml how to ??
Calling a ColdFusion Web Service method
Sample DOM/SAX Question #4
JDOM rules, Why use anything else?
Writing XML using JAVA
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:49:45.