10 #include "tools/ToolsConfig.h"
11 #include "tools/NoCopy.h"
64 Element(
Element *parent,
const stdString &name,
const stdString &value);
70 Element(
Element *parent,
const char *name,
const char *format, ...)
93 void append(
const char *text,
size_t len)
94 { value.append(text, len); }
100 PROHIBIT_DEFAULT_COPY(
Element);
106 stdList<Element *> children;
125 void setDoc(Element *doc);
128 static void indent(FILE *f,
int depth);
141 PROHIBIT_DEFAULT_COPY(
FUX);
144 friend class FUXContentHandler;
145 friend class FUXErrorHandler;
152 static void start_tag(
void *data,
const char *el,
const char **attr);
153 static void text_handler(
void *data,
const char *s,
int len);
154 static void end_tag(
void *data,
const char *el);
155 void dump_element(FILE *f, Element *e,
int depth);
Element(Element *parent, const stdString &name)
Create new, empty element.
The f.u.XML helper class.
Definition: FUX.h:40
void clear()
Clear/delete the current document.
Definition: FUX.h:119
Element * parse(const char *file_name)
Parse the given XML file into the FUX tree.
const stdString & getName() const
Definition: FUX.h:77
Element * getParent()
Definition: FUX.h:85
stdList< Element * > & getChildren()
Definition: FUX.h:89
Element * find(const char *name)
const stdString & getValue() const
Definition: FUX.h:81
void dump(FILE *f)
Dumps the FUX document.
stdString DTD
The DTD. Set for dump().
Definition: FUX.h:109
static void indent(FILE *f, int depth)
Add indentation to the file.
One element in the FUX tree.
Definition: FUX.h:51
void setDoc(Element *doc)
Set the document.
void append(const char *text, size_t len)
Append text to value.
Definition: FUX.h:93
__attribute__((format(printf, 4, 5)))
Create Element, using printf-style format and args for value.