diff --git a/src/dom/xmlreader.h b/src/dom/xmlreader.h
index 755122fb12920d623ca3685bf8cd6de490aaa220..3f97d87c9c6a4b2a7be2baaa8c786966e3bd127e 100644 (file)
--- a/src/dom/xmlreader.h
+++ b/src/dom/xmlreader.h
-#ifndef _XMLREADER_H_\r
-#define _XMLREADER_H_\r
-\r
-/**\r
- * Phoebe DOM Implementation.\r
- *\r
- * This is a C++ approximation of the W3C DOM model, which follows\r
- * fairly closely the specifications in the various .idl files, copies of\r
- * which are provided for reference. Most important is this one:\r
- *\r
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html\r
- *\r
- * Authors:\r
- * Bob Jamison\r
- *\r
- * Copyright (C) 2005 Bob Jamison\r
- *\r
- * This library is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU Lesser General Public\r
- * License as published by the Free Software Foundation; either\r
- * version 2.1 of the License, or (at your option) any later version.\r
- *\r
- * This library is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
- * Lesser General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU Lesser General Public\r
- * License along with this library; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
- */\r
-\r
-\r
-#include "dom.h"\r
-\r
-namespace org\r
-{\r
-namespace w3c\r
-{\r
-namespace dom\r
-{\r
-\r
-\r
-\r
-class XmlReader\r
-{\r
-public:\r
-\r
- /**\r
- *\r
- */\r
- XmlReader();\r
-\r
- /**\r
- *\r
- */\r
- XmlReader(bool parseAsData);\r
-\r
- /**\r
- *\r
- */\r
- virtual ~XmlReader();\r
-\r
- /**\r
- *\r
- */\r
- org::w3c::dom::Document *parse(const DOMString &buf,\r
- int offset, int length);\r
-\r
- /**\r
- *\r
- */\r
- org::w3c::dom::Document *parse(const DOMString &buf);\r
-\r
- /**\r
- *\r
- */\r
- org::w3c::dom::Document *parseFile(char *fileName);\r
-\r
-\r
-protected:\r
-\r
- void error(char *format, ...);\r
-\r
- int get(int ch);\r
- int peek(int ch);\r
- bool match(int pos, char *str);\r
-\r
- int skipwhite(int ch);\r
- int getWord(int pos, DOMString &result);\r
- int getPrefixedWord(int pos,\r
- DOMString &prefix,\r
- DOMString &shortWord,\r
- DOMString &fullWord);\r
- int getQuoted(int p, DOMString &result);\r
-\r
- int parseVersion(int pos);\r
- int parseDoctype(int pos);\r
-\r
- int parseCDATA (int pos, CDATASection *cdata);\r
- int parseComment(int pos, Comment *comment);\r
- int parseText(int pos, Text *test);\r
-\r
- int parseEntity(int pos, DOMString &buf);\r
-\r
- int parseAttributes(int p0, Node *node, bool *quickClose);\r
-\r
- int parseNode(int p0, Node *node, int depth);\r
-\r
- bool keepGoing;\r
- bool parseAsData;\r
- int pos; //current parse position\r
- int len; //length of parsed region\r
- DOMString parsebuf;\r
-\r
- DOMString loadFile(char *fileName);\r
-\r
- int lineNr;\r
- int colNr;\r
-\r
- Document *document;\r
-\r
-};\r
-\r
-} //namespace dom\r
-} //namespace w3c\r
-} //namespace org\r
-\r
-#endif /*_XMLREADER_H_*/\r
+#ifndef _XMLREADER_H_
+#define _XMLREADER_H_
+
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * 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
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "dom.h"
+
+namespace org
+{
+namespace w3c
+{
+namespace dom
+{
+
+
+
+class XmlReader
+{
+public:
+
+ /**
+ *
+ */
+ XmlReader();
+
+ /**
+ *
+ */
+ XmlReader(bool parseAsData);
+
+ /**
+ *
+ */
+ virtual ~XmlReader();
+
+ /**
+ *
+ */
+ org::w3c::dom::DocumentPtr parse(const DOMString &buf,
+ int offset, int length);
+
+ /**
+ *
+ */
+ org::w3c::dom::DocumentPtr parse(const DOMString &buf);
+
+ /**
+ *
+ */
+ org::w3c::dom::DocumentPtr parseFile(const DOMString &fileName);
+
+
+private:
+
+ void error(const char *format, ...)
+ #ifdef G_GNUC_PRINTF
+ G_GNUC_PRINTF(2, 3)
+ #endif
+ ;
+
+ int get(int ch);
+ int peek(int ch);
+ bool match(int pos, char const *str);
+
+ int skipwhite(int ch);
+ int getWord(int pos, DOMString &result);
+ int getPrefixedWord(int pos,
+ DOMString &prefix,
+ DOMString &shortWord,
+ DOMString &fullWord);
+ int getQuoted(int p, DOMString &result);
+
+ int parseVersion(int pos);
+ int parseDoctype(int pos);
+
+ int parseCDATA (int pos, CDATASectionPtr cdata);
+ int parseComment(int pos, CommentPtr comment);
+ int parseText(int pos, TextPtr text);
+
+ int parseEntity(int pos, DOMString &buf);
+
+ int parseAttributes(int p0, NodePtr node, bool *quickClose);
+
+ int parseNode(int p0, NodePtr node, int depth);
+
+ bool keepGoing;
+ bool parseAsData;
+ int pos; //current parse position
+ int len; //length of parsed region
+ DOMString parsebuf;
+
+ DOMString loadFile(const DOMString &fileName);
+
+ int lineNr;
+ int colNr;
+
+ DocumentPtr document;
+
+};
+
+} //namespace dom
+} //namespace w3c
+} //namespace org
+
+#endif /*_XMLREADER_H_*/