You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/04/24 15:32:17 UTC

What is the proper way to create and serialize documents?

We use Xerces-J 1.0.3, and Xerces-C 1.1.0 in two different parts of our
code.  The
Java package is used in new software, and the C++ package is used in
conjunction
with legacy code.  On the Java side, we create an XML based script, and
pass it
to the legacy code.  Xerces C won't process the script due to a bad
DocType
element.  No matter what I've tried (Probably a dozen different ways), I
can't get
Xerces to generate the correct DocType (SYSTEM, not PRIVATE), or to
leave
the DocType out altogether.  I'm using the DOM to create the docuement,
as
apposed to pretending that I'm a parser for SAX mode.

currently, we are using this code:

 DocumentImpl doc = new DocumentImpl();
 DocumentTypeImpl docType = new DocumentTypeImpl(doc,
"/development/xml/script.dtd");

 setDocument(doc);
 getDocument().createElement("script");