org.apache.batik.dom.util
Class XMLSupport

java.lang.Object
  |
  +--org.apache.batik.dom.util.XMLSupport

public class XMLSupport
extends java.lang.Object

This class provides support for XML features.


Field Summary
static java.lang.String XML_NAMESPACE_URI
          The XML namespace URI.
static java.lang.String XMLNS_NAMESPACE_URI
          The xmlns namespace URI.
 
Constructor Summary
protected XMLSupport()
          This class do not need to be instanciated.
 
Method Summary
static java.lang.String defaultXMLSpace(java.lang.String data)
          Strips the white spaces in the given string according to the xml:space attribute recommended behaviour when it has the 'default' value.
static java.lang.String getXMLLang(Element elt)
          Returns the xml:lang attribute value of the given element.
static java.lang.String getXMLSpace(Element elt)
          Returns the xml:space attribute value of the given element.
static java.lang.String preserveXMLSpace(java.lang.String data)
          Strips the white spaces in the given string according to the xml:space attribute recommended behaviour when it has the 'preserve' value.
static void setXMLLang(Element elt, java.lang.String lang)
          Sets the xml:lang attribute value of the given element.
static void setXMLSpace(Element elt, java.lang.String space)
          Sets the xml:space attribute value of the given element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_NAMESPACE_URI

public static final java.lang.String XML_NAMESPACE_URI
The XML namespace URI.

XMLNS_NAMESPACE_URI

public static final java.lang.String XMLNS_NAMESPACE_URI
The xmlns namespace URI.
Constructor Detail

XMLSupport

protected XMLSupport()
This class do not need to be instanciated.
Method Detail

getXMLLang

public static java.lang.String getXMLLang(Element elt)
Returns the xml:lang attribute value of the given element.

setXMLLang

public static void setXMLLang(Element elt,
                              java.lang.String lang)
Sets the xml:lang attribute value of the given element.

getXMLSpace

public static java.lang.String getXMLSpace(Element elt)
Returns the xml:space attribute value of the given element.

setXMLSpace

public static void setXMLSpace(Element elt,
                               java.lang.String space)
                        throws DOMException
Sets the xml:space attribute value of the given element.

defaultXMLSpace

public static java.lang.String defaultXMLSpace(java.lang.String data)
Strips the white spaces in the given string according to the xml:space attribute recommended behaviour when it has the 'default' value.

preserveXMLSpace

public static java.lang.String preserveXMLSpace(java.lang.String data)
Strips the white spaces in the given string according to the xml:space attribute recommended behaviour when it has the 'preserve' value.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.