|
Qizx/open 4.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.qizx.xdm.AttributeList
com.qizx.xdm.XMLPushStreamBase
com.qizx.api.util.PushStreamToDOM
public class PushStreamToDOM
An implementation of XMLPushStream which creates W3C DOM documents or nodes.
This class can be used to export or convert a XML tree from Qizx to any system accepting DOM representation.
Caution: leading and trailing Comments or Processing-Instructions (i.e. preceding or following the topmost Element) are discarded. This feature is in fact not really supported by W3C DOM.
| Field Summary |
|---|
| Fields inherited from interface com.qizx.api.XMLPushStream |
|---|
NSCOPY_NOPRESERVE_INHERIT, NSCOPY_NOPRESERVE_NOINHERIT, NSCOPY_PRESERVE_INHERIT, NSCOPY_PRESERVE_NOINHERIT |
| Constructor Summary | |
|---|---|
PushStreamToDOM()
Creates a DOM output using the default DOM implementation. |
|
PushStreamToDOM(DOMImplementation implem)
Creates a DOM output using a specified DOM implementation. |
|
| Method Summary | |
|---|---|
Node |
exportNode(Node node)
Converts a node of the XDM into a W3C DOM node. |
Document |
getResultDocument()
Returns the DOM document built. |
void |
putComment(String contents)
Puts a Comment event. |
boolean |
putDocumentStart()
Puts a Document Start event. |
void |
putElementEnd(QName name)
Puts an Element End event. |
void |
putElementStart(QName name)
Puts an Element Start event. |
void |
putProcessingInstruction(String target,
String contents)
Puts a Processing-instruction event. |
void |
putText(String text)
Puts a Text Fragment event. |
void |
reset()
Resets the state before a new use. |
| Methods inherited from class com.qizx.xdm.XMLPushStreamBase |
|---|
abort, defineContextMappings, flush, getNSPrefix, getNSURI, isAtRoot, maxVolumeReached, noSpace, putAtom, putAtomText, putAttribute, putChars, putDocumentEnd, putDTD, putLongAtom, putNamespace, putNamespaces, putNodeCopy, putNodeCopy, putNodeText, setCheckNS, setMaxVolume, setTrace |
| Methods inherited from class com.qizx.xdm.AttributeList |
|---|
addAttribute, getAttributeCount, getIndex, getIndex, getIndex, getLength, getLocalName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getQName, getType, getType, getType, getURI, getValue, getValue, getValue |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PushStreamToDOM()
throws DataModelException
DataModelException - wraps a ParserConfigurationExceptionpublic PushStreamToDOM(DOMImplementation implem)
implem - DOM implementation| Method Detail |
|---|
public Node exportNode(Node node)
throws DataModelException
node - a Node of the XQuery Data Model.
DataModelException - not thrownpublic Document getResultDocument()
public boolean putDocumentStart()
throws DataModelException
XMLPushStream
putDocumentStart in interface XMLPushStreamputDocumentStart in class com.qizx.xdm.XMLPushStreamBaseDataModelException - reasons
public void putElementStart(QName name)
throws DataModelException
XMLPushStreamShould precede namespace and attributes event for the element.
putElementStart in interface XMLPushStreamputElementStart in class com.qizx.xdm.XMLPushStreamBasename - qualified name of the element. The local-part and
namespace-URI properties of the name are used, but the prefix is
ignored: to define a namespace (i.e a prefix/namespace-URI
association), use the XMLPushStream.putNamespace(java.lang.String, java.lang.String) method.
DataModelException - reasons
public void putElementEnd(QName name)
throws DataModelException
XMLPushStream
putElementEnd in interface XMLPushStreamputElementEnd in class com.qizx.xdm.XMLPushStreamBasename - qualified name of the element
DataModelException - reasons
public void putText(String text)
throws DataModelException
XMLPushStreamA text fragment should appear inside an element. Consecutive text events are coalesced into one. An empty text fragment is discarded.
text - a fragment of text
DataModelException - reasons
public void putComment(String contents)
throws DataModelException
XMLPushStream
putComment in interface XMLPushStreamputComment in class com.qizx.xdm.XMLPushStreamBasecontents - contents of a comment.
DataModelException - reasons
public void putProcessingInstruction(String target,
String contents)
throws DataModelException
XMLPushStream
putProcessingInstruction in interface XMLPushStreamputProcessingInstruction in class com.qizx.xdm.XMLPushStreamBasetarget - target (name) of the PIcontents - contents of the PI
DataModelException - reasonspublic void reset()
com.qizx.xdm.XMLPushStreamBaseShould always be called before using the object again.
reset in class com.qizx.xdm.XMLPushStreamBase
|
© 2010 Axyana Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||