56 #ifndef _xmlutfconversion_cpp
57 #define _xmlutfconversion_cpp
77 bool HaveSlash =
false;
81 while (!stream.get(ReadOne).fail() && !stream.eof())
83 OneTag.push_back(ReadOne);
85 if (
'<' == ReadOne && !InText)
90 if (
'"' == ReadOne &&
'\\' != PrevOne )
93 if ( !InText &&
'/' == ReadOne )
119 if(!Doc->
Load(OneTag.c_str()))
147 for(
Whole Counter=0; Counter<XMLText.size(); ++Counter)
149 switch(XMLText.at(Counter))
152 Results.append(
""");
155 Results.append(
"&");
158 Results.append(
"<");
161 Results.append(
">");
164 Results.append(1,XMLText.at(Counter));
173 #endif // Include guard
String GetOneTag(std::istream &stream)
Gets the first tag out of the Stream and returns it as a String.
Document * PreParseClassFromSingleTag(const String &NameSpace, const String &ClassName, const String &OneTag)
Perform a basic series of checks for extracting meaning from a single xml tag.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
int Integer
A datatype used to represent any integer close to.
A few functions to help the XML system perform conversions between UTF8 and the native wide character...
ParseResult Load(std::basic_istream< char, std::char_traits< char > > &stream, unsigned int options=ParseDefault, Encoding DocumentEncoding=EncodingAuto)
Load XML from a stream.
This implements the exception hiearchy for Mezzanine.
char Char8
A datatype to represent one character.
A light-weight handle for manipulating nodes in DOM tree.
The definition of the XML::Document Class.
Thrown when parameters are checked at runtime and found invalid.
The root node of any xml hierarchy is a Document.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
String EscapeXML(const String &XMLText)
Convert < > & and " in text to <, >, & and "e so text can safely be stored in XML.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
std::string String
A datatype used to a series of characters.