Package com.day.text
Class ISO9075
- java.lang.Object
-
- com.day.text.ISO9075
-
public class ISO9075 extends java.lang.Object
Implements the encode and decode routines as specified for XML name to SQL identifier conversion in ISO 9075-14:2003.
If a characterc
is not valid at a certain position in an XML 1.0 NCName it is encoded in the form: '_x' + hexValueOf(c) + '_'
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
decode(java.lang.String name)
Decodes thename
.static java.lang.String
encode(java.lang.String name)
Encodesname
as specified in ISO 9075.static java.lang.String
encodePath(java.lang.String path)
Encodespath
as specified in ISO 9075.
-
-
-
Method Detail
-
encode
public static java.lang.String encode(java.lang.String name)
Encodesname
as specified in ISO 9075.- Parameters:
name
- theString
to encode.- Returns:
- the encoded
String
orname
if it does not need encoding.
-
encodePath
public static java.lang.String encodePath(java.lang.String path)
Encodespath
as specified in ISO 9075. Please note that the character '[
' is not encoded but rather interpreted as the start of an index in a path segment.- Parameters:
path
- theString
to encode.- Returns:
- the encoded
String
.
-
decode
public static java.lang.String decode(java.lang.String name)
Decodes thename
.- Parameters:
name
- theString
to decode.- Returns:
- the decoded
String
.
-
-