You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2002/05/31 23:01:06 UTC

cvs commit: xml-xerces/c/src/xercesc/dom/impl DOMWriterImpl.cpp

peiyongz    2002/05/31 14:01:06

  Modified:    c/src/xercesc/dom/impl DOMWriterImpl.cpp
  Log:
  move printing of XMLDecl into the processNode().
  
  Revision  Changes    Path
  1.3       +9 -13     xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp
  
  Index: DOMWriterImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMWriterImpl.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DOMWriterImpl.cpp	29 May 2002 21:31:50 -0000	1.2
  +++ DOMWriterImpl.cpp	31 May 2002 21:01:06 -0000	1.3
  @@ -55,8 +55,11 @@
    */
   
   /*
  - * $Id: DOMWriterImpl.cpp,v 1.2 2002/05/29 21:31:50 knoaman Exp $
  + * $Id: DOMWriterImpl.cpp,v 1.3 2002/05/31 21:01:06 peiyongz Exp $
    * $Log: DOMWriterImpl.cpp,v $
  + * Revision 1.3  2002/05/31 21:01:06  peiyongz
  + * move printing of XMLDecl into the processNode().
  + *
    * Revision 1.2  2002/05/29 21:31:50  knoaman
    * DOM L3 LS: DOMInputSource, DOMEntityResolver, DOMImplementationLS and DOMBuilder
    *
  @@ -424,19 +427,7 @@
                                       , XMLFormatter::UnRep_CharRef);
   		Janitor<XMLFormatter> janName(fFormatter);
   
  -        //
  -		// if this is a document node
  -		// print out the XML Decl node first
  -		//
  -		if (nodeToWrite.getNodeType() == DOMNode::DOCUMENT_NODE)
  -		{
  -			setURCharRef();
  -			*fFormatter << gXMLDecl1 << gXMLDecl2 << fEncodingUsed << gXMLDecl3 << fNewLineUsed;
  -		}
  -        
   		processNode(&nodeToWrite);
  -		*fFormatter << fNewLineUsed; // add linefeed in requested output encoding
  -
   	}
   
   	//
  @@ -632,6 +623,11 @@
   
   	case DOMNode::DOCUMENT_NODE: // Not to be shown to Filter
           {
  +			setURCharRef();
  +			*fFormatter << gXMLDecl1 << gXMLDecl2;
  +			*fFormatter << fEncodingUsed << gXMLDecl3;
  +			*fFormatter << fNewLineUsed;
  +
               DOMNode *child = nodeToWrite->getFirstChild();
               while( child != 0)
               {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org