36 #define G_PARSE "GXmlPI::parse(std::string&)"
200 for (
int k = 0; k < indent; ++k) {
221 const int& indent)
const
233 result.append(
"GXmlPI::"+
m_pi);
299 int n = segment.length();
302 if (n < 4 || (segment.compare(0,2,
"<?") != 0) ||
303 (segment.compare(n-2,2,
"?>") != 0)) {
304 std::string msg =
"Missing or invalid Processing Instruction brackets "
305 "encountered in XML segment \""+segment+
"\". Please "
306 "verify the XML format.";
312 m_pi = segment.substr(2, n-4);
Abstract XML node base class.
GXmlNode & operator=(const GXmlNode &node)
Assignment operator.
virtual void write(GUrl &url, const int &indent=0) const
Write Processing Instruction into URL.
XML Processing Instruction node class.
void init_members(void)
Initialise class members.
void copy_members(const GXmlPI &node)
Copy class members.
XML PI node class interface definition.
GXmlPI & operator=(const GXmlPI &node)
Assignment operator.
void free_members(void)
Delete class members.
virtual ~GXmlPI(void)
Destructor.
void parse(const std::string &segment)
Parse comment segment string.
GXmlPI(void)
Void constructor.
virtual std::string print(const GChatter &chatter=NORMAL, const int &indent=0) const
Print XML Processing Instruction.
virtual GXmlPI * clone(void) const
Clone XML Processing Instruction.
virtual void clear(void)
Clear XML Processing Instruction.
void init_members(void)
Initialise class members.
virtual void printf(const char *format,...)=0
std::string m_pi
Processing instruction (without brackets)
Exception handler interface definition.
void free_members(void)
Delete class members.
std::string fill(const std::string &s, const int &n)
Fill string with n strings of same type.