public class DefaultElementFactory extends Object implements ElementFactory
HtmlElement
subclass.
The constructor is expected to take 2 arguments of type
HtmlPage
and Map
where the first one is the owning page of the element, the second one is a map
holding the initial attributes for the element.Modifier and Type | Field and Description |
---|---|
static List<String> |
SUPPORTED_TAGS_
You can generate your own test cases by looking into ElementTestSource.generateTestForHtmlElements.
|
Constructor and Description |
---|
DefaultElementFactory() |
Modifier and Type | Method and Description |
---|---|
HtmlElement |
createElement(SgmlPage page,
String tagName,
Attributes attributes)
Creates an element according to this factory's specification.
|
HtmlElement |
createElementNS(SgmlPage page,
String namespaceURI,
String qualifiedName,
Attributes attributes)
Creates an element according to this factory's specification.
|
public HtmlElement createElement(SgmlPage page, String tagName, Attributes attributes)
ElementFactory
createElement
in interface ElementFactory
page
- the owning pagetagName
- the HTML tag nameattributes
- initial attributes, possibly null
public HtmlElement createElementNS(SgmlPage page, String namespaceURI, String qualifiedName, Attributes attributes)
ElementFactory
createElementNS
in interface ElementFactory
page
- the owning pagenamespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiateattributes
- initial attributes, possibly null
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.