Class XMLDocBuilder


  • public final class XMLDocBuilder
    extends Object
    Author:
    Mathieu Carbou (mathieu.carbou@gmail.com)
    • Method Detail

      • addNamespace

        public XMLDocBuilder addNamespace​(String prefix,
                                          String namespaceURI)
        Add a namespace to the document that will be created
        Parameters:
        prefix - The prefix of the namespace
        namespaceURI - The URI of the namespace
        Returns:
        this
      • addDefaultNamespace

        public XMLDocBuilder addDefaultNamespace​(String defaultNamespaceURI)
        Set the default namespace to use in the document declaration. I.e. <html xmlns="http://www.w3.org/1999/xhtml">
        Parameters:
        defaultNamespaceURI - URI to use as default when tags are not prefixed
        Returns:
        this
      • addRoot

        public XMLTag addRoot​(String tagName)
        Create a root node for this XML document
        Parameters:
        tagName - Name of the element
        Returns:
        XMLDoc instance to build and navigate in the document