DomWriter
Properties
The current node that events would need to be written to
The sequence of events to use for indentation
Shortcut string to use for indentation. This uses indentSequence as storage.
A namespace context that provides access to known namespaces/prefixes at this point in the writer.
The requested encoding for the document. This is set through startDocument and null if left default.
Whether this document is requested to be standalone. This is set through startDocument and null if left default.
The requested version of the document. This is set through startDocument and null if left default.
The document that is used to create nodes
Determine whether an XML declaration is written
Functions
Close the document. This will do checks, and update the state, but there is no actual content in an xml stream that corresponds to it.
Create a writer that wraps a substream ensuring that document level events are ignored.
Get the namespace uri the prefix is currently bound to
Write ignorable whitespace.
Write a namespace declaration attribute.
Write a processing instruction with the given raw content. When using, prefer the version taking two arguments
Write a processing instruction with the given target and data
Safe version of CDSect that writes multiple CD Sections to handle embedded ]]>
Helper to write the given node to the xml writer.
Serialize the content of the reader to the writer. This will continue until the reader has no more events. Note that this does not attempt to balance the tags. It will ignore star/end document events, processing instructions and document declarations if the writer has depth>0 (is in an element where such instructions are illegal).
Enhanced function for writing start tags, that will attempt to reuse prefixes.
Enhanced function for writing start tags, that will attempt to reuse prefixes. Rather than use the passed prefix it will look up the prefix for the given namespace, and if present use that. It will also ensure to write the appropriate namespace attribute if needed. If the namespace is the default/null, xml or the xmlns namespace the implementation will be as expected.
Helper function for writing tags that will automatically write the end tag. Otherwise uses the version that does not take a body parameter.
Start the document. This causes an xml declaration to be generated with the relevant content.
Write an attribute (must be in tag writing state - no content written yet).
Write the current event to the writer. Note that for tags/start elements this will write the attributes, but not the children.
Write the entirety of an element content to the writer.
Write the child content of the current element in the reader to the output This does not write the container itself
