Serializing an XML document

10-11  Source: Network gathering  Views:0 

Advertisement
Hello, I recently downloaded the Java XML Pack, which uses the Xerces2 XML Parser. A couple of questions with regards to serializing an XML document to a file:
1) Xerces1 used the org.apache.xml.serialize.* classes to do serialization (such as shown below), but I don't see them in the Xerces2 API. Which packages take over for these in Xerces2?
import org.apache.xml.serialize.Serializer;
import org.apache.xml.serialize.SerializerFactory;
import org.apache.xml.serialize.XMLSerializer;
2) If we use the JAXP wrapper functionality to serialize instead, is the javax.xml.transform package the standard way to do this in 1.2?--from the examples I've seen searching this forum, this appears to be the case.
Thanks,
Glen
If you want to output your XML to a file, say, then yes the Transformer is the way to do it now. Don't know why they did that, it's far from intuitively obvious.
Related articles
  • Serializing an XML document 10-11

    Hello, I recently downloaded the Java XML Pack, which uses the Xerces2 XML Parser. A couple of questions with regards to serializing an XML document to a file: 1) Xerces1 used the org.apache.xml.serialize.* classes to do serialization (such as shown

  • Serializing XML Documents(not Java Serialization) 11-30

    Hi, Iam looking for a class that can serialize the XML documents. Heres the problem in detail: - I need to create an XML String from scratch taking data from a database. - I created the XML Document adding the childs and attributes. - I need an XML s

  • Exchange XML document containing serialized DDIC objects 11-30

    Hi, Suppose you have an itab "z_table" with generic linetype. The table may contain any ddic structure or table. Furhter you want to exchange the itab "z_table" between the Systems A and B using XML. We are using the following code to

  • Embedding XSL in XML document 10-11

    Hi I am new to this particular forum. I had some query regarding embedding XSL . Can we embedd the XSL stylesheet in the XML document itself. I searched this forum and got some similar queries but the output isn't working. Can anyone put a working ex

  • Filling tab of an XML document created by DOM 10-11

    have a problem with filling tab of an XML file created by DOM I used this code to create the document: public class DOMCreation { public void createDOM( String a, String b ) {           Document doc = new DocumentImpl( null );           // Il codice

  • Error while loading an XML document using a structured application 10-11

    Hi, I try to load an XML document using a structured application defined in the default structapps.fm My code is shown down, extracted from the FDK API code sample. Problem, I always have the same message : "Cannot find the file named e:\xml\AdobeFra

  • Problem replacing Null nodes with real values in XML documents... 10-11

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production Our friends in Java land are insisting on passing data between Java and PL/SQL using fairly small XML documents (don't ask). I then need to extract the input parameter value

  • Performance issues with FDK in large XML documents 10-11

    In my current project with FrameMaker 8 I'm experiencing severe performance issues with some FDK API calls. The documents are about 3-8 MBytes in size. Fortmatted they cover 150-250 pages. When importing such an XML document I do some extensive "post

  • Parse and output XML document while preserving attribute order 10-11

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes? The following code will parse and XML document and generate (practically) unchanged output.

  • Display xml documents - how to submit a feature request? 10-11

    Safari is useless when it comes to render raw xml documents. You have to view the actual source to see the xml. Is there an official way to submit a feature request for safari to apple? I would love to see something similar to what firefox does with

  • Displaying XML Document in new browser window 10-11

    Hi, I have a hyperlink on my page. When I click on it, it will open a new IE window and display xml document. The new window is displaying some of the xml and at the end displaying the following: The XML page cannot be displayed Cannot view XML input

  • Error: No valid XML document received*_ 10-11

    Hi All, We are connecting our CCMS system to NetWeaver J2EE engine on which E-Sourcing is running. For this we registered java component and hosts in cen. But we are getting error as : No valid XML document received Please can anyone tell me how to o

  • How to insert data into a table from an xml document 10-11

    using the XmlSql Utility, how do I insert data into a table from an xml document, using the sqlplus prompt. if i use the xmlgen.insertXML(....) requires a CLOB file, which i dont have, only the xml doc. Cant i insert directly from the doc to the tabl

  • How can I access xml document from javascript whithin a JSP page 10-11

    how can I access xml document from javascript whithin a JSP page? I have a JSP that receives an XML document from a JavaBean, so I can access it within the entire JSP, but I need to access it from the javascript inside the JSP... and I have no idea h

  • Is there a way to modify the style sheet so that it transforms an XML document with empty tags as tag / ? 10-11

    I have extracted some code from codeproject to reindent an XML document. Does anyone know how I can modify the stylesheet to make it so that the transform of an XML file will result in empty tags showing up as <tag /> instead of <tag></tag&

  • The size of a XML document stored in a XMLType table 10-11

    Is there a way to find out (via SQL) the size of a XML document stored in a XMLType table or XMLType column (storage OR based)? For instance in the way you could it retrieve if the XML document was stored in an XMLType column (CLOB based) SQL> r 1 se

  • How to save sections of a single XML Document to multiple tables ? 10-11

    Firstly, I apologise for the long e-mail but I feel it's necessary in order to clarify my problem/question. The XML document representation below stores information about a particular database. From the information in the XML document you can tell th

  • SSRS Reports getting error in XML document (1, 6110). 10-11

    Hi, SCCM 2012 R2  Query reports opening error it shows below errors few reports only open properly. Stack Trace:    at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TRet

  • Heap space error while creating XML document from Resultset 10-11

    I am getting Heap space error while creating XML document from Resultset. It was working fine from small result set object but when the size of resultset was more than 25,000, heap space error I am already using -Xms32m -Xmx1024m Is there a way to di

  • Error while building xml document 10-11

    Hi Everyone, I have a problem while building xml document. I have developed my java files using IBM Eclipse 3.0 and i had no problem while executing the files. But while i am trying to execute the same code in jdk/bin, xml document is not working.. N