com.mycila.xmltool
Class XMLDocBuilder

java.lang.Object
  extended by com.mycila.xmltool.XMLDocBuilder

public final class XMLDocBuilder
extends java.lang.Object

Author:
Mathieu Carbou (mathieu.carbou@gmail.com)

Method Summary
 XMLDocBuilder addDefaultNamespace(java.lang.String defaultNamespaceURI)
          Set the default namespace to use in the document declaration.
 XMLDocBuilder addNamespace(java.lang.String prefix, java.lang.String namespaceURI)
          Add a namespace to the document that will be created
 XMLTag addRoot(java.lang.String tagName)
          Create a root node for this XML document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addNamespace

public XMLDocBuilder addNamespace(java.lang.String prefix,
                                  java.lang.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(java.lang.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(java.lang.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


Copyright © 2008-2011 Mathieu Carbou. All Rights Reserved.