com.devsphere.xml.saxdomix.helpers
Class DefaultSDXHelper
java.lang.Object
|
+--com.devsphere.xml.saxdomix.helpers.DefaultSDXOldHelper
|
+--com.devsphere.xml.saxdomix.helpers.DefaultSDXHelper
- All Implemented Interfaces:
- SDXHelper, SDXOldHelper
- Direct Known Subclasses:
- DefaultSDXHelperT
- public class DefaultSDXHelper
- extends DefaultSDXOldHelper
- implements SDXHelper
This default factory for DOM nodes called helper is used
by SDXBuilder.
- See Also:
SDXBuilder,
SDXHelper,
DefaultSDXOldHelper
|
Method Summary |
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String data,
boolean newCDATA,
org.w3c.dom.Element parent)
Creates a DOM CDATASection node and appends it as a child
to the given parent element or just appends the data
to the last child of parent if that last child is
a CDATASection node and newCDATA is
false. |
org.w3c.dom.Comment |
createComment(java.lang.String data,
org.w3c.dom.Element parent)
Creates a DOM Comment node and appends it as a child
to the given parent element. |
org.w3c.dom.Element |
createElement(java.lang.String namespaceURI,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes,
org.w3c.dom.Element parent)
Creates a DOM Element node and appends it as a child
to the given parent element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSDXHelper
public DefaultSDXHelper()
- Creates a new helper.
createElement
public org.w3c.dom.Element createElement(java.lang.String namespaceURI,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes,
org.w3c.dom.Element parent)
- Creates a DOM
Element node and appends it as a child
to the given parent element. The attributes stored by
the SAX object are retrieved and set to the created DOM object.
- Specified by:
createElement in interface SDXHelper
- Parameters:
namespaceURI - The namespace URI for the new elementqualifiedName - The qualified name for the new elementattributes - The attributes for the new elementparent - The parent for the new element or
null if this is a root element
- Returns:
- The created DOM
Element
createCDATASection
public org.w3c.dom.CDATASection createCDATASection(java.lang.String data,
boolean newCDATA,
org.w3c.dom.Element parent)
- Creates a DOM
CDATASection node and appends it as a child
to the given parent element or just appends the data
to the last child of parent if that last child is
a CDATASection node and newCDATA is
false. In other words, this method avoids the creation
of adjacent CDATASection nodes and creates a
CDATASection node only when this is necessary or required.
- Specified by:
createCDATASection in interface SDXHelper
- Parameters:
data - The character data for the CDATA sectionnewCDATA - Indicates the beginning of a new CDATA sectionparent - The parent for the CDATA section
- Returns:
- The created or existent
CDATASection node
createComment
public org.w3c.dom.Comment createComment(java.lang.String data,
org.w3c.dom.Element parent)
- Creates a DOM
Comment node and appends it as a child
to the given parent element.
- Specified by:
createComment in interface SDXHelper
- Parameters:
data - The data for the new commentparent - The parent for the new comment
- Returns:
- The created
Comment node