Class XmlSerializer
java.lang.Object
org.htmlunit.html.XmlSerializer
Utility to handle conversion from HTML code to XML string.
- Author:
- Ahmed Ashour, Ronald Brill, Marc Guillemot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasXml(DomElement node) getAttributesFor(HtmlImage image) getAttributesFor(HtmlLink link) protected booleanisExcluded(DomElement element) protected voidprintOpeningTag(DomElement node) Prints the content between "<" and ">" (or "/>") in the output of the tag name and its attributes in XML format.protected voidprotected voidprintXml(DomElement node) void
-
Constructor Details
-
XmlSerializer
public XmlSerializer()
-
-
Method Details
-
save
- Throws:
IOException
-
asXml
- Parameters:
node- a node- Returns:
- the xml representation according to the setting of this serializer
- Throws:
IOException- in case of problem saving resources
-
printXml
- Throws:
IOException
-
asText
-
printText
-
printOpeningTag
Prints the content between "<" and ">" (or "/>") in the output of the tag name and its attributes in XML format.- Parameters:
node- the node whose opening tag is to be printed- Throws:
IOException- in case of problem saving resources
-
getAttributesFor
- Throws:
IOException
-
getAttributesFor
-
isExcluded
-