|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.util.XMLTools
public class XMLTools
Static helper methods to deal with common XML issues
| Constructor Summary | |
|---|---|
XMLTools()
|
|
| Method Summary | |
|---|---|
static boolean |
effectiveBooleanValue(net.sf.saxon.value.AtomicValue atVal)
|
static java.lang.String |
getNamespaceURIforPrefix(java.lang.String pfx,
net.sf.saxon.s9api.XdmNode node)
|
static javax.xml.namespace.QName |
javaxQName(net.sf.saxon.s9api.QName qname)
Creates a new javax QName from a saxon QName |
static javax.xml.namespace.QName |
javaxQName(net.sf.saxon.value.QNameValue qname)
Creates a new javax QName from a saxon QName |
static javax.xml.namespace.QName |
javaxQName(java.lang.String value,
net.sf.saxon.s9api.XdmNode node)
|
static javax.xml.namespace.QName |
javaxQName(net.sf.saxon.om.StructuredQName qname)
|
static java.lang.Object |
jdomNode(net.sf.saxon.s9api.XdmNode node)
|
static java.util.Collection<?> |
jdomNodeSet(net.sf.saxon.s9api.XdmSequenceIterator iter)
|
static java.util.Collection<?> |
jdomNodeSet(net.sf.saxon.s9api.XdmValue descriptionNodes)
|
static java.lang.String |
qnameToString(javax.xml.namespace.QName q)
Serializes the QName as a string using the prefix:localName if prefix is not defined then this method uses {namespace}:localName |
static net.sf.saxon.value.QNameValue |
qnameValue(javax.xml.namespace.QName q)
|
static java.lang.String |
removeNamespaceDeclarations(java.lang.String string)
This method removes namespace declarations from the incoming string. |
static net.sf.saxon.s9api.QName |
saxonQName(javax.xml.namespace.QName qname)
Creates a new saxon QName from a javax QName |
static void |
setJDomElementValue(org.jdom.Element jdomNode,
java.lang.Object value)
Sets to jdomNode the value after the required conversions depending on the object type. |
static net.sf.saxon.om.StructuredQName |
structuredQName(javax.xml.namespace.QName qName)
|
static java.util.Collection<?> |
textToJDomNodes(java.lang.String string)
Returns a collection of text and Element nodes transforming the content of the string parameter accordingly |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLTools()
| Method Detail |
|---|
public static net.sf.saxon.s9api.QName saxonQName(javax.xml.namespace.QName qname)
qname - in the javax library
public static javax.xml.namespace.QName javaxQName(net.sf.saxon.s9api.QName qname)
qname - in the Saxon library
public static javax.xml.namespace.QName javaxQName(net.sf.saxon.value.QNameValue qname)
qname - in the Saxon value library
public static javax.xml.namespace.QName javaxQName(java.lang.String value,
net.sf.saxon.s9api.XdmNode node)
value - node -
public static boolean effectiveBooleanValue(net.sf.saxon.value.AtomicValue atVal)
atVal -
public static net.sf.saxon.value.QNameValue qnameValue(javax.xml.namespace.QName q)
nodeName -
public static java.util.Collection<?> jdomNodeSet(net.sf.saxon.s9api.XdmValue descriptionNodes)
descriptionNodes -
public static java.util.Collection<?> jdomNodeSet(net.sf.saxon.s9api.XdmSequenceIterator iter)
public static java.lang.Object jdomNode(net.sf.saxon.s9api.XdmNode node)
node -
public static java.lang.String getNamespaceURIforPrefix(java.lang.String pfx,
net.sf.saxon.s9api.XdmNode node)
pfx - errorNode -
public static javax.xml.namespace.QName javaxQName(net.sf.saxon.om.StructuredQName qname)
next -
public static net.sf.saxon.om.StructuredQName structuredQName(javax.xml.namespace.QName qName)
qName -
public static java.lang.String qnameToString(javax.xml.namespace.QName q)
if prefix is not defined then this method uses {namespace}:localName
q -
public static void setJDomElementValue(org.jdom.Element jdomNode,
java.lang.Object value)
if value is null, jdom node content is unset.
if value is a String, BigDecimal, BigInteger, Double, Float, Boolean, QName or net.sf.saxon.s9api.QName the
value is converted to a string using the toString or toPlainString methods.
if valule is a QName, namespaces may be added to the node.
if value is not any of the previously value types, the toString method is used on the value object.
jdomNode - as org.jdom.Elementvalue - as Object
public static java.util.Collection<?> textToJDomNodes(java.lang.String string)
throws org.jdom.JDOMException
string -
org.jdom.JDOMExceptionpublic static java.lang.String removeNamespaceDeclarations(java.lang.String string)
string - this is a valid XML string including xmlns:XXXXX="whatever" declarations.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||