diff --git a/src/dom/xmlwriter.cpp b/src/dom/xmlwriter.cpp
index c7a6e32ece4eed564349917ee43e531381203d9c..2b056cf9fe10cf7bef82d6e31d91c328e1a22244 100644 (file)
--- a/src/dom/xmlwriter.cpp
+++ b/src/dom/xmlwriter.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2008 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/**
*
*/
-void XmlWriter::po(char *fmt, ...)
+void XmlWriter::po(const char *fmt, ...)
{
char str[257];
va_list args;
/**
*
*/
-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)
{