<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG>Abhishek<SPAN
class=310504413-21101999>,</SPAN></STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG><SPAN
class=310504413-21101999></SPAN></STRONG></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG><SPAN
class=310504413-21101999>Most of the XML Parser implementations provides
mechanism to generate well formed XML documents from the DOM Tree. I have used
sun's XML parser, it provides APIs to generate well-formed XML from your
Document Node.</SPAN></STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG><SPAN
class=310504413-21101999></SPAN></STRONG></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG><SPAN
class=310504413-21101999>Hope it
helps.</SPAN></STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><STRONG><SPAN
class=310504413-21101999>Sanjeev</SPAN></STRONG></FONT></FONT></FONT></DIV>
<DIV><FONT color=#0000ff><FONT face=Arial><SPAN
class=310504413-21101999></SPAN></FONT></FONT><FONT face=Tahoma><FONT
size=2><SPAN class=310504413-21101999><STRONG><FONT color=#0000ff
face="Comic Sans MS"> </FONT></STRONG></SPAN></FONT></FONT></DIV>
<DIV><FONT face=Tahoma><FONT size=2><SPAN
class=310504413-21101999> </SPAN>-----Original Message-----<BR><B>From:</B>
Abhishek Srivastava [mailto:abisheks@india.hp.com]<BR><B>Sent:</B> Wednesday,
October 20, 1999 1:29 AM<BR><B>To:</B> xml dev mailing list<BR><B>Subject:</B>
Is this Immpossible !!<BR><BR></DIV></FONT>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"></FONT>
<DIV><FONT face=Arial size=2>Hi All,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have the following requirement. A client wants
to query a database. It sends out an SQL Query to the Database server. At the
server side, instead of returning a recordset, it returns an XML
File.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The client on receiving the XML file, parsers it
for "Validity" (to be sure that all elements it had asked for are
there).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Problem is that at the server side, How to build
the xml document.</FONT></DIV>
<DIV><FONT face=Arial size=2>Presently, I am doing something like
this</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>String("<Name>") + rs.getField("auName") +
String("</Name>")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>However, this is a very inelegant approach as the
code is full of such string concatenations.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Is there a more elegant solution to this ?
All the material on XML talks about parsing and reading XML. What about
writing them ? Are there DOM / SAX Api extensions available that would
</FONT></DIV>
<DIV><FONT face=Arial size=2>create "VALID" XML documents without clutter in
the code ?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Any help would be greatly
appreciated.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks & Best Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Abhishek.</FONT></DIV>
<DIV><FONT face=Arial
size=2>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>
_/
Abhishek Srivastava<BR>
_/
Hewlett Packard ISO <BR>
_/_/_/ _/_/_/ -------------------
<BR> _/ / _/ _/
(Work) +91-80-2251554 x1190<BR>_/ _/
_/_/_/ (Ip)
15.10.47.37
<BR>
_/
(Url) <A
href="http://sites.netscape.net/abhishes/homepage">http://sites.netscape.net/abhishes/homepage</A>
<BR>
_/ You've
heard it all by now. Get wired or get whacked.
<BR>
You're networking or you're not working. Dot-com or die
<BR>
- SUN
MICROSYSTEMS <BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>