|
Qizx/db 2.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
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 class com.qizx.xdm.XMLPushStreamBase |
baseURI, contextualMappings, docStarted, dtdInternalSubset, dtdName, dtdPublicId, dtdSystemid, elementName, elementStarted, endDocumentDone, maxVolume, spaceNeeded, startDocumentDone, trace, volume, VOLUME_LIMIT |
| Fields inherited from class com.qizx.xdm.AttributeList |
attrCnt, attrNames, attrTypes, attrValues, nsContext |
| 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. |
protected void |
flushElementStart(boolean isEmpty)
Implementation of processing of "end of start tag", triggered by element content or end of element. |
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, checkCommentValue, checkNameMapping, checkPIValue, completeNameMappings, defineContextMappings, flush, isAtRoot, maxVolumeReached, noSpace, putAtom, putAtomText, putAttribute, putChars, putDocumentEnd, putDTD, putLongAtom, putNamespace, putNamespaces, putNodeCopy, putNodeCopy, resolvePrefix, 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, rawAddAttribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, 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
DataModelException
public void putElementStart(QName name)
throws DataModelException
XMLPushStreamShould precede namespace and attributes event for the element.
DataModelException
public void putElementEnd(QName name)
throws DataModelException
XMLPushStream
DataModelException
protected void flushElementStart(boolean isEmpty)
throws DataModelException
com.qizx.xdm.XMLPushStreamBaseOutput is normally delayed until this method is called.
isEmpty - true if element has no contents (triggered by elementEnd)
DataModelException
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
DataModelException
public void putProcessingInstruction(String target,
String contents)
throws DataModelException
XMLPushStream
DataModelExceptionpublic void reset()
com.qizx.xdm.XMLPushStreamBaseShould always be called before using the object again.
|
© 2008 Axyana Software | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||