YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
org.seamless.xml.DOMElement< CHILD extends DOMElement, PARENT extends DOMElement > Class Template Referenceabstract

Wraps a W3C element. More...

Collaboration diagram for org.seamless.xml.DOMElement< CHILD extends DOMElement, PARENT extends DOMElement >:
Collaboration graph

Classes

class  ArrayBuilder
 
class  Builder
 

Public Member Functions

 DOMElement (XPath xpath, Element element)
 
Element getW3CElement ()
 
String getElementName ()
 
String getContent ()
 
DOMElement< CHILD, PARENT > setContent (String content)
 
String getAttribute (String attribute)
 
DOMElement setAttribute (String attribute, String value)
 
PARENT getParent ()
 
CHILD[] getChildren ()
 
CHILD[] getChildren (String name)
 
CHILD getRequiredChild (String name) throws ParserException
 
CHILD[] findChildren (String name)
 
CHILD findChildWithIdentifier (final String id)
 
CHILD getFirstChild (String name)
 
CHILD createChild (String name)
 
CHILD createChild (String name, String namespaceURI)
 
CHILD appendChild (CHILD el, boolean copy)
 
CHILD replaceChild (CHILD original, CHILD replacement, boolean copy)
 
void replaceEqualChild (DOMElement source, String identifier)
 
void removeChild (CHILD el)
 
void removeChildren ()
 
String toSimpleXMLString ()
 
String toString ()
 
XPath getXpath ()
 
Collection< PARENT > getXPathParentElements (Builder< CHILD > builder, String expr)
 
Collection< CHILD > getXPathChildElements (Builder< CHILD > builder, String expr)
 
PARENT getXPathParentElement (Builder< PARENT > builder, String expr)
 
CHILD getXPathChildElement (Builder< CHILD > builder, String expr)
 
Collection getXPathElements (Builder builder, String expr)
 
String getXPathString (XPath xpath, String expr)
 
Object getXPathResult (String expr, QName result)
 
Object getXPathResult (Node context, String expr, QName result)
 

Public Attributes

final Builder< PARENT > PARENT_BUILDER
 
final ArrayBuilder< CHILD > CHILD_BUILDER
 

Protected Member Functions

CHILD adoptOrImport (Document document, CHILD child, boolean copy)
 
abstract Builder< PARENT > createParentBuilder (DOMElement el)
 
abstract ArrayBuilder< CHILD > createChildBuilder (DOMElement el)
 
String prefix (String localName)
 

Detailed Description

Wraps a W3C element.

Using XPath for simple queries like "get all children with attribute value X" is actually slower than iterating with the W3C API. We still use XPath because there is a small chance that the authors of the XML implementation in the JDK will not get forced by Larry to fix their ugly code and APIs. Yes, it' s unlikely but one can dream...

Author
Christian Bauer

The documentation for this class was generated from the following file: