From 2fc492df00a28b2882d45e34f11cf3a06e32cf01 Mon Sep 17 00:00:00 2001 From: ishmal Date: Tue, 5 Sep 2006 16:11:09 +0000 Subject: [PATCH] Fix for now. Probably remove this later, to be deprecated in favor of LSWriter --- src/dom/xmlwriter.cpp | 12 ++++++------ src/dom/xmlwriter.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dom/xmlwriter.cpp b/src/dom/xmlwriter.cpp index c7a6e32ec..13fe76e5a 100644 --- a/src/dom/xmlwriter.cpp +++ b/src/dom/xmlwriter.cpp @@ -82,9 +82,9 @@ void XmlWriter::pos(const DOMString &str) /** * */ -void XmlWriter::write(const Node *nodeArg) +void XmlWriter::write(const NodePtr nodeArg) { - Node *node = (Node *)nodeArg; + NodePtr node = nodeArg; indent+=2; @@ -101,7 +101,7 @@ void XmlWriter::write(const Node *nodeArg) //### Attributes for (int i=0 ; igetNodeName()); po("=\""); @@ -119,8 +119,8 @@ void XmlWriter::write(const Node *nodeArg) pos(node->getNodeValue()); //### Children - for (Node *child = node->getFirstChild() ; - child ; + for (NodePtr child = node->getFirstChild() ; + child.get() ; child=child->getNextSibling()) { write(child); @@ -139,7 +139,7 @@ void XmlWriter::write(const Node *nodeArg) /** * */ -void XmlWriter::writeFile(FILE *f, const Node *node) +void XmlWriter::writeFile(FILE *f, const NodePtr node) { if (!node) { diff --git a/src/dom/xmlwriter.h b/src/dom/xmlwriter.h index fb6d66f28..bd8501019 100644 --- a/src/dom/xmlwriter.h +++ b/src/dom/xmlwriter.h @@ -53,9 +53,9 @@ public: virtual ~XmlWriter(); - void write(const Node *node); + void write(const NodePtr node); - void writeFile(FILE *f, const Node *node); + void writeFile(FILE *f, const NodePtr node); protected: -- 2.30.2