Devsphere.com


com.devsphere.xml.saxdomix.helpers
Interface SDXHelper

All Known Implementing Classes:
DefaultSDXHelper

public interface SDXHelper

SDXBuilder needs a factory for DOM nodes that implements this interface.

See Also:
SDXBuilder, DefaultSDXHelper

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.
 org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data, org.w3c.dom.Element parent)
          Creates a DOM ProcessingInstruction node and appends it as a child to the given parent element.
 org.w3c.dom.Text createTextNode(java.lang.String data, org.w3c.dom.Element parent)
          Creates a DOM Text 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 Text node.
 

Method Detail

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.

Parameters:
namespaceURI - The namespace URI for the new element
qualifiedName - The qualified name for the new element
attributes - The attributes for the new element
parent - The parent for the new element or null if this is a root element
Returns:
The created DOM Element

createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data,
                                       org.w3c.dom.Element parent)
Creates a DOM Text 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 Text node. In other words, this method doesn't allow the creation of adjacent Text nodes and creates a Text node only when this is necessary.

Parameters:
data - The character data for the text node
parent - The parent for the text node
Returns:
The created or existent Text node

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.

Parameters:
data - The character data for the CDATA section
newCDATA - Indicates the beginning of a new CDATA section
parent - The parent for the CDATA section
Returns:
The created or existent CDATASection node

createProcessingInstruction

public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String target,
                                                                     java.lang.String data,
                                                                     org.w3c.dom.Element parent)
Creates a DOM ProcessingInstruction node and appends it as a child to the given parent element.

Parameters:
target - The target for the new processing instruction
data - The data for the new processing instruction
parent - The parent for the new processing instruction
Returns:
The created ProcessingInstruction

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.

Parameters:
data - The data for the new comment
parent - The parent for the new comment
Returns:
The created Comment node

 Devsphere.com