Re: Creating XML documents using SAX ?

2003-01-07 Thread Tinny Ng
Thomas, The sample SAXPrint writes the XML document to stdout using SAX. It's quite easy to modify from there and write to a file instead of stdout. For example, you can construct SAXPrintHandlers::fFormatter with LocalFileFormatTarget instead of SAXPrintHandlers, e.g.. SAXPrintHandlers::SAXP

Re: What is the best way to write a XML DOM tree to a file with all indentation?

2003-01-07 Thread Tinny Ng
Igor, Your code seems to be ok. But Xerces-C++ 2.1.0 didn't implement the formatPrettyPrint feature with indentation. Such implementation has been changed in the current development code. Now the formatPrettyPrint feature prints indentation and newline. Please try again with the latest nigh

Re: Creating XML documents using SAX ?

2003-01-07 Thread Gareth Reakes
Hi, It is possible to do what you want. What you have then is an implemented SAX application. SAX itself does not provide an "output source" for use. Writing out a document is only 1 of a very large number of possible uses. It is possible to use cout inside of the methods and that will writ

Creating XML documents using SAX ?

2003-01-07 Thread Pfleger Thomas,E2
Hello Xerces users/developers! It is possible to create an XML document using calls to SAX (like startElement). This is illustrated in some samples I found in books. After examining the documentation of Xerces, I found no means to set an output source for the document. Disappointig enough, this

Re: How to get a line number from a DOMNode?

2003-01-07 Thread Gareth Reakes
Hi, the information is available at parse time. You will have to bind it to the DOMNodes then (perhaps using UserInfo). Gareth On Mon, 6 Jan 2003, Elizabeth Walkup wrote: > > Is there a way I can retrieve the file and line number corresponding > to a given DOMNode? It appears that li

Re: DOMWriter swallowed namespaces

2003-01-07 Thread Gareth Reakes
Hi, the namespace attributes are only used at parse time and as such using createElementNS will not create a namespace attribute. DOMWriter as well as the normalizeDocument method is supposed to have the functionality. We have not implemented it yet. Have a look in the archives for more inf