BrianMc1958
asked on
Newbie: How to create XML in Java?
Dear Experts,
How do you create XML from within Java, other than by hand-coding it? Assuming you have:
FieldA, with value "A",
and
FieldB, with value "123",
is there some AUTOMATED technique for generating:
<FieldA>A</FieldA><FieldB> 123</Field B>
Could you point me towards documentation?
Thanks, Experts!
--BrianMc1958
How do you create XML from within Java, other than by hand-coding it? Assuming you have:
FieldA, with value "A",
and
FieldB, with value "123",
is there some AUTOMATED technique for generating:
<FieldA>A</FieldA><FieldB>
Could you point me towards documentation?
Thanks, Experts!
--BrianMc1958
this has got the sample code to generate the xml from a java class
http://www.codegeneration.net/tiki-read_article.php?articleId=65
http://www.codegeneration.net/tiki-read_article.php?articleId=65
follow step by step procedure as suggested in above links
For your reference
http://www.javaalmanac.com/egs/javax.xml.parsers/pkg.html
http://www.javaalmanac.com/egs/org.xml.sax/pkg.html
http://www.javaalmanac.com/egs/javax.xml.parsers/pkg.html
http://www.javaalmanac.com/egs/javax.xml.transform/pkg.html
http://www.javaalmanac.com/egs/javax.xml.transform.sax/pkg.html
http://www.javaalmanac.com/egs/javax.xml.parsers/pkg.html
http://www.javaalmanac.com/egs/org.xml.sax/pkg.html
http://www.javaalmanac.com/egs/javax.xml.parsers/pkg.html
http://www.javaalmanac.com/egs/javax.xml.transform/pkg.html
http://www.javaalmanac.com/egs/javax.xml.transform.sax/pkg.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You Experts are incredible. Thank you to everyone, especially to Naeemg! It's just what I was looking for.
--BrianMc1958
--BrianMc1958
http://java.sun.com/xml/tutorial_intro.html