mrglavas    2004/02/19 14:34:06

  Modified:    java/docs faq-dom.xml
  Log:
  Adding FAQ on Java Object Serialization.
  
  Revision  Changes    Path
  1.14      +22 -3     xml-xerces/java/docs/faq-dom.xml
  
  Index: faq-dom.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/faq-dom.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- faq-dom.xml       30 Jan 2004 15:12:35 -0000      1.13
  +++ faq-dom.xml       19 Feb 2004 22:34:06 -0000      1.14
  @@ -79,9 +79,10 @@
       </a>
     </faq>
   
  -  <faq title="Serializing a DOM document.">
  +  <faq title="Serializing a DOM document">
       <q>How do I serialize DOM to an output stream?</q>
  -    <a> <p>
  +    <a><anchor name="dom-xml-serialization"/>
  +      <p>
        You can serialize a DOM tree by using Xerces 
<code>org.apache.xml.XMLSerializer</code>:
         </p>
         <source>import org.apache.xml.serialize.OutputFormat;
  @@ -123,6 +124,25 @@
   String str = writer.writeToString(document);</source>  
       </a>
     </faq>
  +  
  +  <faq title="Java Object Serialization of a DOM">
  +    <q>Does Xerces DOM implement java.io.Serializable?</q>
  +    <a>
  +      <p>Yes. Xerces DOM can be serialized using Java object serialization.
  +         It is recommended that a DOM be serialized as 
  +         <link anchor='dom-xml-serialization'>XML</link> where possible
  +         instead of using object serialization.
  +      </p>
  +      <p>By choosing object serialization you sacrifice interoperability 
  +         between parsers and we do not guarantee interoperability 
  +         between versions of Xerces. It should be used with caution.
  +      </p>
  +      <p>Some rough measurements have shown that XML serialization performs
  +         better than Java object serialization and that XML instance documents 
  +         require less storage space than object serialized DOMs.
  +      </p>
  +    </a>
  +  </faq>
   
     <faq title="Specifying non-Xerces DOM implementation">
       <q>How do I supply my own implementation of the DOM?</q>
  @@ -235,7 +255,6 @@
                <p>
                        DOM revalidation is supported via W3C DOM Level 3 Core
                        <em>Document.normalizeDocument()</em>.
  -                     .
                </p>
                <note>This release only supports revalidation against XML Schemas. 
Revalidation against DTDs or any other schema type is not implemented.</note>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to