Class SimpleNodeFactory

java.lang.Object
nu.validator.htmlparser.xom.SimpleNodeFactory

public class SimpleNodeFactory extends Object
A simpler node factory that does not use Nodes..
Version:
$Id$
Author:
hsivonen
  • 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

      public nu.xom.Text makeText(String string)
      return new Text(string);
      Parameters:
      string -
      Returns:
    • makeComment

      public nu.xom.Comment makeComment(String string)
      return new Comment(string);
      Parameters:
      string -
      Returns:
    • makeElement

      public nu.xom.Element makeElement(String name, String namespace)
      return new Element(name, namespace);
      Parameters:
      name -
      namespace -
      Returns:
    • makeElement

      public nu.xom.Element makeElement(String name, String namespace, nu.xom.Element form)
      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: