Package nu.validator.htmlparser.xom
Class SimpleNodeFactory
java.lang.Object
nu.validator.htmlparser.xom.SimpleNodeFactory
A simpler node factory that does not use
Nodes
..- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnu.xom.Attribute
makeAttribute
(String localName, String uri, String value, nu.xom.Attribute.Type type) return new Attribute(localName, uri, value, type);
nu.xom.Comment
makeComment
(String string) return new Comment(string);
nu.xom.Document
return new ModalDocument(new Element("root", "http://www.xom.nu/fakeRoot"));
nu.xom.Element
makeElement
(String name, String namespace) return new Element(name, namespace);
nu.xom.Element
makeElement
(String name, String namespace, nu.xom.Element form) return new FormPtrElement(name, namespace, form);
nu.xom.Text
return new Text(string);
-
Constructor Details
-
SimpleNodeFactory
public SimpleNodeFactory()
-
-
Method Details
-
makeAttribute
public nu.xom.Attribute makeAttribute(String localName, String uri, String value, nu.xom.Attribute.Type type) return new Attribute(localName, uri, value, type);
- Parameters:
localName
-uri
-value
-type
-- Returns:
-
makeText
return new Text(string);
- Parameters:
string
-- Returns:
-
makeComment
return new Comment(string);
- Parameters:
string
-- Returns:
-
makeElement
return new Element(name, namespace);
- Parameters:
name
-namespace
-- Returns:
-
makeElement
return new FormPtrElement(name, namespace, form);
- Parameters:
name
-namespace
-form
-- Returns:
-
makeDocument
public nu.xom.Document makeDocument()return new ModalDocument(new Element("root", "http://www.xom.nu/fakeRoot"));
Subclasses adviced to return an instance of
Mode
. (Not required, though.)- Returns:
-