|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.ispsoft.jaxme.generator.util.DOM
A set of utility methods for working with DOM documents.
Field Summary | |
static java.lang.String |
DOM_XMLNS_URI
The DOM namespace for xmlns attributes. |
Constructor Summary | |
DOM()
|
Method Summary | |
static void |
assignBeanProperties(java.lang.Object pBean,
org.w3c.dom.Node pNode)
Treats the attributes and child elements of the given DOM element pElement as bean properties of the
bean pBean . |
static void |
assignBeanProperties(java.lang.Object pBean,
org.w3c.dom.Node pNode,
ReflectResolver pResolver)
|
static org.w3c.dom.Element |
getAnnotationNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:annotation node, or null, if no such node exists. |
static org.w3c.dom.Element |
getAppInfoNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:appinfo node, or null, if no such node exists. |
static org.w3c.dom.Element |
getChildElement(org.w3c.dom.Node pNode,
java.lang.String pNamespaceURI,
java.lang.String pLocalName)
Returns the child element with namespace URI pNamespaceURI
and local name pLocalName of pNode , if any.
|
static org.w3c.dom.Element |
getDocumentationNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:documentation node, or null, if no such node exists. |
static java.lang.String |
getElementValue(org.w3c.dom.Node node)
Returns an element nodes text contents by appending any text nodes or cdata section nodes value. |
static java.lang.String |
getPrefixOf(org.w3c.dom.Node pNode,
java.lang.String pURI)
Given an attribute or element node, tries to return a valid prefix declaration for a given namespace. |
static boolean |
isAtomic(org.w3c.dom.Node pNode)
Returns whether the given node is an atomic element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DOM_XMLNS_URI
The DOM namespace for xmlns attributes.
Constructor Detail |
public DOM()
Method Detail |
public static java.lang.String getElementValue(org.w3c.dom.Node node)
Returns an element nodes text contents by appending any text nodes or cdata section nodes value.
public static void assignBeanProperties(java.lang.Object pBean, org.w3c.dom.Node pNode) throws SchemaException
Treats the attributes and child elements of the
given DOM element pElement
as bean properties of the
bean pBean
. More precise:
pElement
has, a method setSomeElement or
addSomeElement is searched. The method is
called with the attribute value, if it exists.
SchemaException
public static void assignBeanProperties(java.lang.Object pBean, org.w3c.dom.Node pNode, ReflectResolver pResolver) throws SchemaException
SchemaException
public static boolean isAtomic(org.w3c.dom.Node pNode)
Returns whether the given node is an atomic element.
public static org.w3c.dom.Element getAnnotationNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:annotation node, or null, if no such node exists.
public static org.w3c.dom.Element getAppInfoNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:appinfo node, or null, if no such node exists.
public static org.w3c.dom.Element getDocumentationNode(org.w3c.dom.Element pNode)
Returns an elements or attributes xs:documentation node, or null, if no such node exists.
public static java.lang.String getPrefixOf(org.w3c.dom.Node pNode, java.lang.String pURI)
Given an attribute or element node, tries to return a valid prefix declaration for a given namespace.
pNode
- The node to querypURI
- The namespace URI
public static org.w3c.dom.Element getChildElement(org.w3c.dom.Node pNode, java.lang.String pNamespaceURI, java.lang.String pLocalName)
Returns the child element with namespace URI pNamespaceURI
and local name pLocalName
of pNode
, if any.
If pNode
is null or no such child element exists, returns null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |