|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
22 #ifndef ELM_XOM_SERIALIZER_H_
23 #define ELM_XOM_SERIALIZER_H_
25 #include <elm/string.h>
26 #include <elm/xom/String.h>
27 #include <elm/io/Output.h>
31 namespace io {
class OutStream; }
42 class ProcessingInstruction;
51 inline const string&
getEncoding(
void)
const {
return _encoding; }
52 inline int getIndent(
void)
const {
return _indent; }
58 inline void setIndent(
int indent) { _indent = indent; }
59 inline void setLineSeparator(
string line_separator) { _line_separator = line_separator; }
60 inline void setMaxLength(
int max_length) { _max_length = max_length; }
73 virtual void write(DocType *doctype);
75 virtual void write(ProcessingInstruction *instruction);
92 string _line_separator;
93 int _indent, _max_length;
95 bool _preserve, _normalize;
void flush(void)
Definition: xom_Serializer.cpp:139
typename type_info< T >::out_t out
Definition: type_info.h:284
virtual void write(Document *doc)
Definition: xom_Serializer.cpp:233
Definition: Serializer.h:46
Serializer(io::OutStream &out_stream)
Definition: xom_Serializer.cpp:106
virtual void writeEmptyElementTag(Element *element)
Definition: xom_Serializer.cpp:351
void setIndent(int indent)
Definition: Serializer.h:58
bool getPreserveBaseURI(void) const
Definition: Serializer.h:55
void setUnicodeNormalizationFormC(bool normalize)
Definition: Serializer.h:63
virtual void writeAttributes(Element *element)
Definition: xom_Serializer.cpp:209
int getMaxLength(void) const
Definition: Serializer.h:54
int getColumnNumber(void)
Definition: xom_Serializer.cpp:153
int getIndent(void) const
Definition: Serializer.h:52
virtual void writeNamespaceDeclaration(const string &prefix, const string &uri)
Definition: xom_Serializer.cpp:388
virtual void writeAttributeValue(String value)
Definition: xom_Serializer.cpp:187
void setOutputStream(io::OutStream &out)
Definition: Serializer.h:61
void setPreserveBaseURI(bool preserve)
Definition: Serializer.h:62
void setStream(OutStream &stream)
Definition: io_Output.cpp:117
virtual void writeEscaped(String text)
Definition: xom_Serializer.cpp:472
void setLineSeparator(string line_separator)
Definition: Serializer.h:59
virtual void writeChild(Node *node)
Definition: xom_Serializer.cpp:329
virtual void writeRaw(String text, int length=-1)
Definition: xom_Serializer.cpp:172
Definition: OutStream.h:30
Definition: Document.h:20
const string & getEncoding(void) const
Definition: Serializer.h:51
virtual void writeEndTag(Element *element)
Definition: xom_Serializer.cpp:366
virtual void writeXMLDeclaration(void)
Definition: xom_Serializer.cpp:456
const string & getLineSeparator(void) const
Definition: Serializer.h:53
virtual void writeNamespaceDeclarations(Element *element)
Definition: xom_Serializer.cpp:400
virtual void writeStartTag(Element *element)
Definition: xom_Serializer.cpp:413
virtual void breakLine(void)
Definition: xom_Serializer.cpp:161
bool getUnicodeNormalizationFormC() const
Definition: Serializer.h:56
void setMaxLength(int max_length)
Definition: Serializer.h:60
Definition: Attribute.h:30