org.abstracthorizon.danube.webdav.xml.common
Class XMLUtils

java.lang.Object
  extended by org.abstracthorizon.danube.webdav.xml.common.XMLUtils

public class XMLUtils
extends Object

Sets of utility methods for creating an XML output

Author:
Daniel Sendula

Constructor Summary
XMLUtils()
           
 
Method Summary
static String createEmptyTag(NamespacesProvider provider, String url, String tagName)
          Creates an empty tag with given namespace prefix
static String createEndTag(NamespacesProvider provider, String url, String tagName)
          Creates an end tag with given namespace prefix
static String createStartOpenTag(NamespacesProvider provider, String url, String tagName)
          Creates an open start tag with given namespace prefix
static String createStartTag(NamespacesProvider provider, String url, String tagName)
          Creates a start tag with given namespace prefix
static String createTag(NamespacesProvider provider, String url, String tagName, Object content)
          Creates a tag with given namespace prefix and tag's content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtils

public XMLUtils()
Method Detail

createStartTag

public static String createStartTag(NamespacesProvider provider,
                                    String url,
                                    String tagName)
Creates a start tag with given namespace prefix

Parameters:
provider - namespace provider
url - namespace URL
tagName - tag name
Returns:
start tag

createStartOpenTag

public static String createStartOpenTag(NamespacesProvider provider,
                                        String url,
                                        String tagName)
Creates an open start tag with given namespace prefix

Parameters:
provider - namespace provider
url - namespace URL
tagName - tag name
Returns:
start tag

createEndTag

public static String createEndTag(NamespacesProvider provider,
                                  String url,
                                  String tagName)
Creates an end tag with given namespace prefix

Parameters:
provider - namespace provider
url - namespace URL
tagName - tag name
Returns:
end tag

createTag

public static String createTag(NamespacesProvider provider,
                               String url,
                               String tagName,
                               Object content)
Creates a tag with given namespace prefix and tag's content

Parameters:
provider - namespace provider
url - namespace URL
tagName - tag name
content - content. May be null and an empty tag is going to be generated then
Returns:
start tag

createEmptyTag

public static String createEmptyTag(NamespacesProvider provider,
                                    String url,
                                    String tagName)
Creates an empty tag with given namespace prefix

Parameters:
provider - namespace provider
url - namespace URL
tagName - tag name
Returns:
start tag


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.