Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

## oracle.xml.util
Class XMLUtil

`java.lang.Object
oracle.xml.util.XMLUtil`

      public class XMLUtil

extends java.lang.Object

Constructor Summary
`XMLUtil()`

Method Summary
`static java.lang.String` `appendRelativeURI(java.lang.String baseUri, java.lang.String relUri)`
`static java.lang.String` `encodeURL(java.lang.String s)` Translates a string into `x-www-form-urlencoded` format.
`static java.lang.String` `getJavaEncoding(java.lang.String enc)` Get Java encoding from IANA encoding
`static java.lang.String` `getLocalName(java.lang.String qualifiedName)` extracts localName part from a qualified name
`static java.lang.String` `getPrefix(java.lang.String qualifiedName)` extracts prefix part from a qualified name
`static boolean` `isAbsoluteURI(java.lang.String uri)`
`static boolean` `isFirstNameChar(char c)` return true if character can be part of a name
`static boolean` `isNameChar(char c)` return true if character can be part of a name
`static boolean` `isNmtokenChar(char c)` return true if character can be part of a NMTOKEN
`static boolean` `isWhiteSpace(char[] ch, int start, int len)` return true if character array is whitespace chars
`static boolean` `isWhiteSpaceChar(char c)` return true if character is whitespace
`static char[]` `mappingChars(char one, java.util.HashMap maps)`
`static java.lang.String` `nodeTypeToString(int type)`
`static byte[]` `parseBase64Binary(java.lang.String value)`
`static java.lang.String` `printBase64Binary(byte[] val)`
`static void` `validateName(java.lang.String name)` Validates a XML Name
`static void` `validatePrefix(java.lang.String prefix)`
`static void` `validateQualifiedName(java.lang.String qualifiedname)` validates qualified name
`static void` `validateQualifiedName(java.lang.String namespaceURI, java.lang.String qualifiedname)` validates qualified name

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XMLUtil

    public XMLUtil()

Method Detail

### getJavaEncoding

    public static java.lang.String getJavaEncoding(java.lang.String enc)

  Get Java encoding from IANA encoding
  Parameters:
    `string` - IANA encoding

### encodeURL

    public static java.lang.String encodeURL(java.lang.String s)

  Translates a string into `x-www-form-urlencoded` format.
  Parameters:
    `s` - `String` to be translated.
  Returns:
    the translated `String`.

### isWhiteSpace

    public static boolean isWhiteSpace(char[] ch,
                                       int start,
                                       int len)

  return true if character array is whitespace chars
  Parameters:
    `ch` - - char array
    `start` - - start index in the array
    `len` - - number of chars to be checked
  Returns:
    true/false

### isWhiteSpaceChar

    public static boolean isWhiteSpaceChar(char c)

  return true if character is whitespace
  Parameters:
    `c` - - char to be checked
  Returns:
    true/false

### isNameChar

    public static boolean isNameChar(char c)

  return true if character can be part of a name
  Parameters:
    `c` - - char to be checked
  Returns:
    true/false

### isNmtokenChar

    public static boolean isNmtokenChar(char c)

  return true if character can be part of a NMTOKEN
  Parameters:
    `c` - - char to be checked
  Returns:
    true/false

### isFirstNameChar

    public static boolean isFirstNameChar(char c)

  return true if character can be part of a name
  Parameters:
    `c` - - char to be checked
  Returns:
    true/false

### validateName

    public static void validateName(java.lang.String name)
                             throws DOMException

  Validates a XML Name
  Throws:
    `DOMException`

### validateQualifiedName

    public static void validateQualifiedName(java.lang.String namespaceURI,
                                             java.lang.String qualifiedname)
                                      throws DOMException

  validates qualified name
  Parameters:
    `qualifiedname` - and the namespaceURI against which it is validated
  Throws:
    `DOMException` - NAMESPACE_ERR: Raised if qualifiedname is malformed or if namespaceURI is null or if qualifiedname has a prefix "xml" and namespaceURI is not http://www.w3c.org/1998/namespace or if qualifiedname or prefix is "xmlns" and namespaceURI is not "http://www.w3c.org/2000/xmlns/" or if namespaceURI is "http://www.w3c.org/2000/xmlns/" and neither qualifiedname nor its prefix is "xmlns".

### validateQualifiedName

    public static void validateQualifiedName(java.lang.String qualifiedname)
                                      throws DOMException

  validates qualified name
  Parameters:
    `qualifiedname` - to be validated
  Throws:
    `DOMException` - NAMESPACE_ERR:Raised if qualifiedname is malformed

### validatePrefix

    public static void validatePrefix(java.lang.String prefix)
                               throws DOMException

  Throws:
    `DOMException`

### getPrefix

    public static java.lang.String getPrefix(java.lang.String qualifiedName)

  extracts prefix part from a qualified name
  Parameters:
    `qualifiedname` - whose prefix part is needed
  Returns:
    the prefix part extracted from the qualifiedname

### getLocalName

    public static java.lang.String getLocalName(java.lang.String qualifiedName)

  extracts localName part from a qualified name
  Parameters:
    `qualifiedname` - whose localName part is needed
  Returns:
    the localName part extracted from the qualifiedname

### nodeTypeToString

    public static java.lang.String nodeTypeToString(int type)

### mappingChars

    public static char[] mappingChars(char one,
                                      java.util.HashMap maps)

### isAbsoluteURI

    public static boolean isAbsoluteURI(java.lang.String uri)

### appendRelativeURI

    public static java.lang.String appendRelativeURI(java.lang.String baseUri,
                                                     java.lang.String relUri)

### parseBase64Binary

    public static byte[] parseBase64Binary(java.lang.String value)

### printBase64Binary

    public static java.lang.String printBase64Binary(byte[] val)

Skip navigation links

Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.