summaryrefslogtreecommitdiff
path: root/src/utilfuns/utilxml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilfuns/utilxml.cpp')
-rw-r--r--src/utilfuns/utilxml.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/utilfuns/utilxml.cpp b/src/utilfuns/utilxml.cpp
index d3af7e5..1537499 100644
--- a/src/utilfuns/utilxml.cpp
+++ b/src/utilfuns/utilxml.cpp
@@ -1,9 +1,11 @@
/******************************************************************************
- * utilxml.cpp - implementaion of utility classes to handle XML processing
*
- * $Id: utilxml.cpp 2378 2009-05-04 23:18:51Z scribe $
+ * utilxml.cpp - Implementaion of utility classes to handle
+ * XML processing
*
- * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
+ * $Id: utilxml.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -23,9 +25,10 @@
#include <ctype.h>
#include <utilstr.h>
+
SWORD_NAMESPACE_START
-const char *XMLTag::nullstr = "";
+
void XMLTag::parse() const {
int i;
int start;
@@ -121,6 +124,7 @@ XMLTag::XMLTag(const char *tagString) {
setText(tagString);
}
+
XMLTag::XMLTag(const XMLTag& t) : attributes(t.attributes) {
parsed = t.parsed;
empty = t.empty;
@@ -137,6 +141,7 @@ XMLTag::XMLTag(const XMLTag& t) : attributes(t.attributes) {
}
}
+
void XMLTag::setText(const char *tagString) {
parsed = false;
empty = false;
@@ -173,6 +178,7 @@ void XMLTag::setText(const char *tagString) {
}
}
+
XMLTag::~XMLTag() {
if (buf)
delete [] buf;
@@ -180,6 +186,7 @@ XMLTag::~XMLTag() {
delete [] name;
}
+
const StringList XMLTag::getAttributeNames() const {
StringList retVal;
@@ -276,6 +283,7 @@ const char *XMLTag::setAttribute(const char *attribName, const char *attribValue
return attribValue;
}
+
const char *XMLTag::toString() const {
SWBuf tag = "<";
if (!parsed)
@@ -318,4 +326,6 @@ bool XMLTag::isEndTag(const char *eID) const {
return endTag;
}
+
SWORD_NAMESPACE_END
+