Package org.htmlunit.html
Class UnknownElementFactory
- java.lang.Object
-
- org.htmlunit.html.UnknownElementFactory
-
- All Implemented Interfaces:
ElementFactory
public final class UnknownElementFactory extends java.lang.Object implements ElementFactory
A factory for elements encountered in parsing the input which are not represented by dedicated element classes.
-
-
Field Summary
Fields Modifier and Type Field Description static UnknownElementFactory
instance
The singleton instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HtmlElement
createElement(SgmlPage page, java.lang.String tagName, org.xml.sax.Attributes attributes)
Creates an element according to this factory's specification.HtmlElement
createElementNS(SgmlPage page, java.lang.String namespaceURI, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
Creates an element according to this factory's specification.HtmlElement
createElementNS(SgmlPage page, java.lang.String namespaceURI, java.lang.String qualifiedName, org.xml.sax.Attributes attributes, boolean checkBrowserCompatibility)
Creates an element according to this factory's specification.
-
-
-
Field Detail
-
instance
public static final UnknownElementFactory instance
The singleton instance.
-
-
Method Detail
-
createElement
public HtmlElement createElement(SgmlPage page, java.lang.String tagName, org.xml.sax.Attributes attributes)
Creates an element according to this factory's specification. Note that even though this method takes a page parameter, the element is not automatically added to the page's DOM tree.- Specified by:
createElement
in interfaceElementFactory
- Parameters:
page
- the enclosing page for the new elementtagName
- the tag name (most factories will be responsible for a specific tag, but this parameter is passed in for factories that don't follow this rule)attributes
- the attributes encountered during XML/HTML parsing (possiblynull
if no attributes specified- Returns:
- the newly created and initialized element
-
createElementNS
public HtmlElement createElementNS(SgmlPage page, java.lang.String namespaceURI, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)
Creates an element according to this factory's specification. Note that even though this method takes a page parameter, the element is not automatically added to the page's DOM tree.- Specified by:
createElementNS
in interfaceElementFactory
- Parameters:
page
- the enclosing page for the new elementnamespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiateattributes
- the attributes encountered during XML/HTML parsing (possiblynull
if no attributes specified- Returns:
- the newly created and initialized element
-
createElementNS
public HtmlElement createElementNS(SgmlPage page, java.lang.String namespaceURI, java.lang.String qualifiedName, org.xml.sax.Attributes attributes, boolean checkBrowserCompatibility)
Creates an element according to this factory's specification. Note that even though this method takes a page parameter, the element is not automatically added to the page's DOM tree.- Specified by:
createElementNS
in interfaceElementFactory
- Parameters:
page
- the enclosing page for the new elementnamespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiateattributes
- the attributes encountered during XML/HTML parsing (possiblynull
if no attributes specifiedcheckBrowserCompatibility
- if true and the page doesn't support this element, return null- Returns:
- the newly created and initialized element
-
-