Code

add proper unix socket includes
[inkscape.git] / src / dom / xmlwriter.h
1 #ifndef __XMLWRITER_H__
2 #define __XMLWRITER_H__
4 /**
5  * Phoebe DOM Implementation.
6  *
7  * This is a C++ approximation of the W3C DOM model, which follows
8  * fairly closely the specifications in the various .idl files, copies of
9  * which are provided for reference.  Most important is this one:
10  *
11  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
12  *
13  * Authors:
14  *   Bob Jamison
15  *
16  * Copyright (C) 2005 Bob Jamison
17  *
18  *  This library is free software; you can redistribute it and/or
19  *  modify it under the terms of the GNU Lesser General Public
20  *  License as published by the Free Software Foundation; either
21  *  version 2.1 of the License, or (at your option) any later version.
22  *
23  *  This library is distributed in the hope that it will be useful,
24  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26  *  Lesser General Public License for more details.
27  *
28  *  You should have received a copy of the GNU Lesser General Public
29  *  License along with this library; if not, write to the Free Software
30  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
31  */
34 #include "dom.h"
35 #include <stdio.h>
38 namespace org
39 {
40 namespace w3c
41 {
42 namespace dom
43 {
47 class XmlWriter
48 {
49 public:
51     XmlWriter();
53     virtual ~XmlWriter();
56     void write(const Node *node);
58     void writeFile(FILE *f, const Node *node);
61 protected:
63     int indent;
65     void spaces();
67     void po(char *str, ...);
69     void pos(const DOMString &str);
71     DOMString buf;
74 };
77 }  //namespace dom
78 }  //namespace w3c
79 }  //namespace org
87 #endif  /* __XMLWRITER_H__ */