gareth 2003/08/12 05:46:57 Modified: c/src/xercesc/dom/impl DOMWriterImpl.cpp Log: Added serialization for attribute nodes. Patch by Caroline Rioux. Revision Changes Path 1.40 +32 -1 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.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- DOMWriterImpl.cpp 18 May 2003 14:02:03 -0000 1.39 +++ DOMWriterImpl.cpp 12 Aug 2003 12:46:57 -0000 1.40 @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.40 2003/08/12 12:46:57 gareth + * Added serialization for attribute nodes. Patch by Caroline Rioux. + * * Revision 1.39 2003/05/18 14:02:03 knoaman * Memory manager implementation: pass per instance manager. * @@ -1131,7 +1134,35 @@ break; } + case DOMNode::ATTRIBUTE_NODE: + { + if (checkFilter(nodeToWrite) != DOMNodeFilter::FILTER_ACCEPT) + break; + + const XMLCh* localName = nodeToWrite->getLocalName(); + // check if this is a DOM Level 1 Node + if(localName == 0) { + *fFormatter << XMLFormatter::NoEscapes + << nodeToWrite->getNodeName() + << chEqual << chDoubleQuote + << XMLFormatter::AttrEscapes + << nodeToWrite->getNodeValue() + << XMLFormatter::NoEscapes + << chDoubleQuote; + } else { + *fFormatter << XMLFormatter::NoEscapes + << chOpenCurly << nodeToWrite->getNamespaceURI() + << chCloseCurly << localName + << chEqual << chDoubleQuote + << XMLFormatter::AttrEscapes + << nodeToWrite->getNodeValue() + << XMLFormatter::NoEscapes + << chDoubleQuote; + } + + break; + } case DOMNode::ENTITY_REFERENCE_NODE: { //"entities"
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]