java.lang.Object
org.htmlunit.html.serializer.XmlMarkupSerializer
The XML serialization used by innerHTML/outerHTML for XHTML and XML documents.
This is a simplified implementation of the algorithm described in DOM Parsing and Serialization - XML serialization: namespace declarations are added if the namespace of an element (or the prefix of an attribute) is not declared by the context; elements without children are written as empty elements.
- Author:
- Ronald Brill
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringserialize(DomNode node, BrowserVersion browserVersion) Serializes the given node including the node itself (the outerHTML).static StringserializeChildren(DomNode node, BrowserVersion browserVersion) Serializes the children of the given node (the innerHTML).
-
Method Details
-
serializeChildren
Serializes the children of the given node (the innerHTML).- Parameters:
node- the node whose children are serializedbrowserVersion- the browser version used to determine the browser specific details- Returns:
- the serialized children
-
serialize
Serializes the given node including the node itself (the outerHTML).- Parameters:
node- the node to serializebrowserVersion- the browser version used to determine the browser specific details- Returns:
- the serialized node
-