Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


oracle.xml.util
Class XMLUtil

java.lang.Object
  extended by 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 qname)
          extracts localName part from a qualified name
static java.lang.String getPrefix(java.lang.String qname)
          extracts prefix part from a qualified name
static boolean isAbsoluteURI(java.lang.String uri)
           
static boolean isFirstNameChar(char c)
          Deprecated. Use isNameStartChar(int)
static boolean isNameChar(char c)
          Deprecated. Use isNameChar(int)
static boolean isNmtokenChar(char c)
          return true if character can be part of a NMTOKEN, according to ???.
static boolean isWhiteSpace(char[] ch, int start, int len)
          return true if character array is whitespace chars, according to Java.
static boolean isWhiteSpaceChar(char c)
          return true if character is whitespace, according to Java.
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 an XML Name, with or without a colon
static void validatePrefix(java.lang.String prefix)
          Validates a prefix in a qualified name.
static void validateQualifiedName(java.lang.String qname)
          validates qualified name
static void validateQualifiedName(java.lang.String uri, java.lang.String qname)
          validates qualified name

 

Methods inherited from class java.lang.Object
equals, 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, according to Java. Warning: This method does not handle supplementary characters (surrogate pairs).
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, according to Java. Warning: This method does not handle supplementary characters (surrogate pairs).
Parameters:
c - - char to be checked
Returns:
true/false

isNameChar

public static boolean isNameChar(char c)
Deprecated. Use isNameChar(int)
return true if character can be part of a name, according to ???. Warning: This method does not handle supplementary characters (surrogate pairs).
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, according to ???. Warning: This method does not handle supplementary characters (surrogate pairs).
Parameters:
c - - char to be checked
Returns:
true/false

isFirstNameChar

public static boolean isFirstNameChar(char c)
Deprecated. Use isNameStartChar(int)
return true if character can be part of a name, according to ???. Warning: This method does not handle supplementary characters (surrogate pairs).
Parameters:
c - - char to be checked
Returns:
true/false

validateName

public static void validateName(java.lang.String name)
                         throws DOMException
Validates an XML Name, with or without a colon
Parameters:
name - - XML name to be checked
Throws:
DOMException - INVALID_CHARACTER_ERR: Raised if the XML name contains an illegal character.

validateQualifiedName

public static void validateQualifiedName(java.lang.String uri,
                                         java.lang.String qname)
                                  throws DOMException
validates qualified name
Parameters:
uri - namespace URI against which it is validated
qname - qualified name against which it is validated
Throws:
DOMException - NAMESPACE_ERR: Raised if qname is malformed; or if namespaceURI is null; or if qname has a prefix "xml" and namespaceURI is not http://www.w3c.org/1998/namespace; or if qname 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 qname nor its prefix is "xmlns". INVALID_CHARACTER_ERR: Raised if qname is empty; or if qname contains an illegal character (for an XML name).

validateQualifiedName

public static void validateQualifiedName(java.lang.String qname)
                                  throws DOMException
validates qualified name
Parameters:
qname - qualified name against which it is validated
Throws:
DOMException - NAMESPACE_ERR: Raised if qname is malformed INVALID_CHARACTER_ERR: Raised if qname is empty, or if qname contains an illegal character (for an XML name).

validatePrefix

public static void validatePrefix(java.lang.String prefix)
                           throws DOMException
Validates a prefix in a qualified name.
Parameters:
prefix - - String value of the prefix in the qualified name
Throws:
DOMException

getPrefix

public static java.lang.String getPrefix(java.lang.String qname)
extracts prefix part from a qualified name
Parameters:
qname - qualified name against which it is validated
Returns:
the prefix part extracted from the qualifiedname

getLocalName

public static java.lang.String getLocalName(java.lang.String qname)
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
12c Release 1 (12.1)

E15981-09


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