| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/io/xmlwriterutil.h>

Public Types | |
| typedef std::pair< std::string, std::string > | XMLAttribute |
| Represents an XML attribute in the form (<attrib-name>, <attrib-value>). | |
Public Member Functions | |
| XMLWriterUtil (std::ostream &target, int indentPerLevel=2) | |
| Creates an XMLWriter util that streams data into a given output stream. | |
| void | writeXMLDeclaration (const std::string &version="1.0", const std::string &encoding="utf-8") |
| Writes out the XML declaration <?xml .. ?> at the beginning of a document. | |
| virtual void | writeOpenTag (const std::string &elementName, SO< VRS::Iterator< XMLAttribute > > attributes=NULL, bool singleLine=false) |
| Writes an XML open tag with the given attributes. | |
| virtual void | writeOpenCloseTag (const std::string &elementName, SO< VRS::Iterator< XMLAttribute > > attributes=NULL) |
| Writes an XML open tag that is closed without having any children (eg. | |
| virtual void | writeCloseTag () |
| Writes an XML closing attribute for the currently open XML tag. | |
| std::ostream & | target () |
| provides direct access to the output stram | |
| VRS_TYPEINFO (XMLWriterUtil, SharedObj) | |
It is not needed for the implementation of DOM XML writers.
| typedef std::pair<std::string, std::string> VRS::XMLWriterUtil::XMLAttribute |
Represents an XML attribute in the form (<attrib-name>, <attrib-value>).
| VRS::XMLWriterUtil::XMLWriterUtil | ( | std::ostream & | target, | |
| int | indentPerLevel = 2 | |||
| ) |
Creates an XMLWriter util that streams data into a given output stream.
'indentPerLevel' specifies spacing ident that is left per hierarchy level, i.e., the root element has indent 0, the 1-level element has an indent of 'indentPerLevel'...
| void VRS::XMLWriterUtil::writeXMLDeclaration | ( | const std::string & | version = "1.0", |
|
| const std::string & | encoding = "utf-8" | |||
| ) |
Writes out the XML declaration <?xml .. ?> at the beginning of a document.
| virtual void VRS::XMLWriterUtil::writeOpenTag | ( | const std::string & | elementName, | |
| SO< VRS::Iterator< XMLAttribute > > | attributes = NULL, |
|||
| bool | singleLine = false | |||
| ) | [virtual] |
Writes an XML open tag with the given attributes.
'attributes' may be NULL. If 'singleLine' is true, the whole element and any child elements are written in a single line until the closeTag is reached. This should be used for very short elements only.
| virtual void VRS::XMLWriterUtil::writeOpenCloseTag | ( | const std::string & | elementName, | |
| SO< VRS::Iterator< XMLAttribute > > | attributes = NULL | |||
| ) | [virtual] |
Writes an XML open tag that is closed without having any children (eg.
<tag a="b">) with the given attributes. 'attributes' may be NULL.
| virtual void VRS::XMLWriterUtil::writeCloseTag | ( | ) | [virtual] |
Writes an XML closing attribute for the currently open XML tag.
writeCloseTag() can only be called if an XML Open tag has been written.
Reimplemented in VRS::XMLNamespaceAwareWriterUtil.
| std::ostream& VRS::XMLWriterUtil::target | ( | ) |
provides direct access to the output stram
| VRS::XMLWriterUtil::VRS_TYPEINFO | ( | XMLWriterUtil | , | |
| SharedObj | ||||
| ) |