JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.html

Class XmlSerializer



  • public class XmlSerializer
    extends Object 
    Utility to handle conversion from HTML code to XML string.
    Author:
    Ahmed Ashour, Ronald Brill, Marc Guillemot
    • Constructor Detail

      • XmlSerializer

        public XmlSerializer()
    • Method Detail

      • asXml

        public String asXml(DomElement node)
         throws IOException 
        Parameters:
        node - a node
        Returns:
        the xml representation according to the setting of this serializer
        Throws:
        IOException - in case of problem saving resources
      • asText

        public String asText(DomNode node)
        Parameters:
        node - a node
        Returns:
        the text representation according to the setting of this serializer
      • printText

        protected void printText(DomNode node)
        Prints the text content from this node and all children.
        Parameters:
        node - the node
      • printOpeningTag

        protected void printOpeningTag(DomElement node)
         throws IOException 
        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

        protected Map<String,DomAttr> getAttributesFor(HtmlImage image)
        Parameters:
        image - the image to get the attributes from
        Returns:
        the attribute map
      • isExcluded

        protected boolean isExcluded(DomElement element)
        Parameters:
        element - the element to check
        Returns:
        true if the element is a HtmlScript
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /