"Babar Abbas" <[EMAIL PROTECTED]> wrote on 09/04/2006 04:49:37 PM:
> Hi all! > There is a Prolog in XML document by default, > <?xml version="1.0" encoding="UTF-8" ?> > The api I have to pass my XML stream requires me to pass > an additional Top Level Tag, > <?qbxml version="2.0" ?> > > so the stream starts with, > <?xml version="1.0" encoding="UTF-8" ?> > <?qbxml version="2.0" ?> > <QBXML> > <QBXMLMsgsRq onError="stopOnError"> > > -------------------- > > > </QBXMLMsgsRq> > </QBXML> > as in the above stream there a 2 prolog or header > elements, xml and qbxml. XML is created by default, but how to > create, the next one i.e. <?qbxml version=" 2.0" ?>, with the api's > in org.w3c.dom package, or by the help of some other xerces package. > for example sax packages. there are method calls to create Elements, > Processing instructions, but no method for creating the prolog or > top level headers, starting with <? ........?>, in the Document > class, or I couldn't find one. Though the two <? ... ?> things look similar syntactically they are different constructs. The first is an XML declaration [1]. The second one is a processing instruction [2]. Klaus gave a few tips on how you can add one to a DOM (in the previous e-mail on this thread). > The 2nd question I had was! > There are so many libraries, e.g. Crimson, Xerces, > Xalan, XMLBeans, SAX, DOM, how are these api's related or > differentiate from one another, which api should be used where. why > so many api's. Anyone pointing me to some articles, or tutorial, I > will be highly obliged, as I am new to XML so wanted to have a clear > understanding. There are plenty of articles floating around on these subjects. If you're looking for a starting point you could try branching out from here: http://www-128.ibm.com/developerworks/xml/newto/. > I am generating XML programmatically and then sending > the stream to another program, I am not getting it from a document, > so which api is best for sophisticated manipulation and generation of XML. > > Any body answering these questions, or any one question, I would be > thankfull. I am waiting eagerly. > > Thanks and regards, > Babar Abbas. [1] http://www.w3.org/TR/2006/REC-xml-20060816/#NT-XMLDecl [2] http://www.w3.org/TR/2006/REC-xml-20060816/#NT-PI Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
