summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e6eb9f8)
raw | patch | inline | side by side (parent: e6eb9f8)
author | ishmal <ishmal@users.sourceforge.net> | |
Tue, 5 Sep 2006 16:11:09 +0000 (16:11 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Tue, 5 Sep 2006 16:11:09 +0000 (16:11 +0000) |
src/dom/xmlwriter.cpp | patch | blob | history | |
src/dom/xmlwriter.h | patch | blob | history |
diff --git a/src/dom/xmlwriter.cpp b/src/dom/xmlwriter.cpp
index c7a6e32ece4eed564349917ee43e531381203d9c..13fe76e5af68fb2d32dbb4b76358fd49470ce585 100644 (file)
--- a/src/dom/xmlwriter.cpp
+++ b/src/dom/xmlwriter.cpp
/**
*
*/
-void XmlWriter::write(const Node *nodeArg)
+void XmlWriter::write(const NodePtr nodeArg)
{
- Node *node = (Node *)nodeArg;
+ NodePtr node = nodeArg;
indent+=2;
//### Attributes
for (int i=0 ; i<nrAttrs ; i++)
{
- Node *attr = attributes.item(i);
+ NodePtr attr = attributes.item(i);
spaces();
pos(attr->getNodeName());
po("=\"");
pos(node->getNodeValue());
//### Children
- for (Node *child = node->getFirstChild() ;
- child ;
+ for (NodePtr child = node->getFirstChild() ;
+ child.get() ;
child=child->getNextSibling())
{
write(child);
/**
*
*/
-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 fb6d66f28b1ea5d035fe0f009e4190d164a3fc60..bd8501019f7c94f18fce67f3d5f6dc6988caea3e 100644 (file)
--- a/src/dom/xmlwriter.h
+++ b/src/dom/xmlwriter.h
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: