|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.XmlNotPortable
public class XmlNotPortable
XmlNotPortable holds static methods for parser dependent code. Currently JDK 1.2 until JDK 1.5 are explicitly covered.
For JDK 1.5 we use only DOM Level 3 compliant coding, so any such parser should do the job.
For JDK <= 1.4 we need the crimson parser.
The current xml code is tested with Sun JDK 1.2 - JDK 1.6 IBM JDK 1.4 and jrockit JDK 5.
Field Summary | |
---|---|
private static java.lang.Class |
clazz_QName
|
private static java.lang.Class |
clazz_XPath
|
private static java.lang.Class |
clazz_XPathFactory
|
static java.lang.String |
ENCODING
xmlBlaster uses generally UTF-8 |
private static java.lang.Object |
field_NODESET
|
private static java.lang.Object |
instance_XPathFactory
|
static int |
JVM_VERSION
We only distinguish: 13 for all JDK <= 1.3 14 for JDK 1.4 15 for all JDK >= 1.5 |
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private static java.lang.reflect.Method |
method_newXPath
|
private static java.lang.Class[] |
paramCls_StringDocument
|
private static int |
version
|
Constructor Summary | |
---|---|
XmlNotPortable()
|
Method Summary | |
---|---|
static java.lang.String |
escape(java.lang.String str)
Encapsulate the given string with CDATA, escapes "]]>" tokens in str. |
static int |
getJvmXmlVersionToUse()
Checks for forcing crimson even for JDK 15 |
static java.util.Enumeration |
getNodeSetFromXPath(java.lang.String expression,
org.w3c.dom.Document document)
Do XPath query on DOM |
static org.w3c.dom.traversal.TreeWalker |
getTreeWalker(org.w3c.dom.Document document,
org.w3c.dom.Node node)
Access a XML DOM node tree walker. |
static void |
main(java.lang.String[] args)
|
static org.w3c.dom.Node |
mergeNode(org.w3c.dom.Document document,
org.w3c.dom.Node node)
Merging a node into another document. |
static int |
protectionNeeded(java.lang.String value)
If value contains XML harmful characters it needs to be wrapped by CDATA or encoded to Base64. |
private static java.io.ByteArrayOutputStream |
write(java.io.ByteArrayOutputStream out,
org.w3c.dom.Node node,
java.lang.String offset)
|
static java.io.ByteArrayOutputStream |
write(org.w3c.dom.Node node)
Dumo the DOM nodes to a XML string. |
static java.io.ByteArrayOutputStream |
writeNode(org.w3c.dom.Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private static java.util.logging.Logger log
private static java.lang.reflect.Method method_newXPath
private static java.lang.Class[] paramCls_StringDocument
private static java.lang.Class clazz_XPathFactory
private static java.lang.Class clazz_XPath
private static java.lang.Class clazz_QName
private static java.lang.Object instance_XPathFactory
private static java.lang.Object field_NODESET
public static int JVM_VERSION
private static int version
public static java.lang.String ENCODING
Constructor Detail |
---|
public XmlNotPortable()
Method Detail |
---|
public static int getJvmXmlVersionToUse()
public static java.util.Enumeration getNodeSetFromXPath(java.lang.String expression, org.w3c.dom.Document document) throws XmlBlasterException
XmlBlasterException
private static final java.io.ByteArrayOutputStream write(java.io.ByteArrayOutputStream out, org.w3c.dom.Node node, java.lang.String offset) throws java.io.IOException
java.io.IOException
public static final java.io.ByteArrayOutputStream writeNode(org.w3c.dom.Node node) throws java.io.IOException
java.io.IOException
public static final java.io.ByteArrayOutputStream write(org.w3c.dom.Node node) throws java.io.IOException
java.io.IOException
public static final org.w3c.dom.Node mergeNode(org.w3c.dom.Document document, org.w3c.dom.Node node)
the
- destination documentthe
- node to merge into the DOM tree, it is invalid after this call
public static final org.w3c.dom.traversal.TreeWalker getTreeWalker(org.w3c.dom.Document document, org.w3c.dom.Node node)
document
- The DOM documentnode
- The root node to walk, if null the document's top node is chosen
java.lang.IllegalArgumentException
- for JDK <= 1.4public static java.lang.String escape(java.lang.String str)
public static int protectionNeeded(java.lang.String value)
value
- The string to verify
public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |