com.mycila.xmltool

Class XMLDocBuilder

public final class XMLDocBuilder extends Object

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

Method Summary
XMLDocBuilderaddDefaultNamespace(String defaultNamespaceURI)
Set the default namespace to use in the document declaration.
XMLDocBuilderaddNamespace(String prefix, String namespaceURI)
Add a namespace to the document that will be created
XMLTagaddRoot(String tagName)
Create a root node for this XML document

Method Detail

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

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

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

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