|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xmlbeans.impl.store.Cursor
public final class Cursor
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.xmlbeans.XmlCursor |
---|
XmlCursor.ChangeStamp, XmlCursor.TokenType, XmlCursor.XmlBookmark, XmlCursor.XmlMark |
Method Summary | |
---|---|
boolean |
___toNextSibling()
|
void |
_addToSelection()
|
void |
_beginElement(javax.xml.namespace.QName name)
|
void |
_beginElement(java.lang.String localName)
|
void |
_beginElement(java.lang.String localName,
java.lang.String uri)
|
void |
_clearBookmark(java.lang.Object key)
|
void |
_clearSelections()
|
int |
_comparePosition(Cursor other)
|
int |
_copyChars(int cch,
Cursor to)
|
boolean |
_copyXml(Cursor to)
|
boolean |
_copyXmlContents(Cursor to)
|
XmlCursor.TokenType |
_currentTokenType()
|
void |
_dispose()
|
XmlDocumentProperties |
_documentProperties()
|
void |
_dump()
|
XmlCursor |
_execQuery(java.lang.String query)
|
XmlCursor |
_execQuery(java.lang.String query,
XmlOptions options)
|
void |
_getAllBookmarkRefs(java.util.Collection listToFill)
|
void |
_getAllNamespaces(java.util.Map addToThis)
|
java.lang.String |
_getAttributeText(javax.xml.namespace.QName attrName)
|
XmlCursor.XmlBookmark |
_getBookmark(java.lang.Object key)
|
java.lang.String |
_getChars()
|
int |
_getChars(char[] buf,
int off,
int cch)
|
XmlCursor.ChangeStamp |
_getDocChangeStamp()
|
Node |
_getDomNode()
|
javax.xml.namespace.QName |
_getName()
|
XmlObject |
_getObject()
|
int |
_getSelectionCount()
|
java.lang.String |
_getTextValue()
|
int |
_getTextValue(char[] chars,
int offset,
int max)
|
boolean |
_hasNextSelection()
|
boolean |
_hasNextToken()
|
boolean |
_hasPrevToken()
|
void |
_insertAttribute(javax.xml.namespace.QName name)
|
void |
_insertAttribute(java.lang.String localName)
|
void |
_insertAttribute(java.lang.String localName,
java.lang.String uri)
|
void |
_insertAttributeWithValue(javax.xml.namespace.QName name,
java.lang.String text)
|
void |
_insertAttributeWithValue(java.lang.String localName,
java.lang.String value)
|
void |
_insertAttributeWithValue(java.lang.String localName,
java.lang.String uri,
java.lang.String value)
|
void |
_insertChars(java.lang.String text)
|
void |
_insertComment(java.lang.String text)
|
void |
_insertElement(javax.xml.namespace.QName name)
|
void |
_insertElement(java.lang.String localName)
|
void |
_insertElement(java.lang.String localName,
java.lang.String uri)
|
void |
_insertElementWithText(javax.xml.namespace.QName name,
java.lang.String text)
|
void |
_insertElementWithText(java.lang.String localName,
java.lang.String text)
|
void |
_insertElementWithText(java.lang.String localName,
java.lang.String uri,
java.lang.String text)
|
void |
_insertNamespace(java.lang.String prefix,
java.lang.String namespace)
|
void |
_insertProcInst(java.lang.String target,
java.lang.String text)
|
boolean |
_isAnyAttr()
|
boolean |
_isAtSamePositionAs(Cursor other)
|
boolean |
_isAttr()
|
boolean |
_isComment()
|
boolean |
_isContainer()
|
boolean |
_isEnd()
|
boolean |
_isEnddoc()
|
boolean |
_isFinish()
|
boolean |
_isLeftOf(Cursor other)
|
boolean |
_isNamespace()
|
boolean |
_isProcinst()
|
boolean |
_isRightOf(Cursor other)
|
boolean |
_isStart()
|
boolean |
_isStartdoc()
|
boolean |
_isText()
|
java.lang.Object |
_monitor()
|
int |
_moveChars(int cch,
Cursor to)
|
boolean |
_moveXml(Cursor to)
|
boolean |
_moveXmlContents(Cursor to)
|
java.lang.String |
_namespaceForPrefix(java.lang.String prefix)
|
XmlCursor |
_newCursor()
|
Node |
_newDomNode()
|
Node |
_newDomNode(XmlOptions options)
|
java.io.InputStream |
_newInputStream()
|
java.io.InputStream |
_newInputStream(XmlOptions options)
|
java.io.Reader |
_newReader()
|
java.io.Reader |
_newReader(XmlOptions options)
|
XMLInputStream |
_newXMLInputStream()
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API. |
XMLInputStream |
_newXMLInputStream(XmlOptions options)
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API. |
javax.xml.stream.XMLStreamReader |
_newXMLStreamReader()
|
javax.xml.stream.XMLStreamReader |
_newXMLStreamReader(XmlOptions options)
|
boolean |
_pop()
|
java.lang.String |
_prefixForNamespace(java.lang.String ns)
|
XmlCursor.TokenType |
_prevTokenType()
|
void |
_push()
|
boolean |
_removeAttribute(javax.xml.namespace.QName attrName)
|
int |
_removeChars(int cch)
|
boolean |
_removeXml()
|
boolean |
_removeXmlContents()
|
void |
_save(ContentHandler ch,
LexicalHandler lh)
|
void |
_save(ContentHandler ch,
LexicalHandler lh,
XmlOptions options)
|
void |
_save(java.io.File file)
|
void |
_save(java.io.File file,
XmlOptions options)
|
void |
_save(java.io.OutputStream os)
|
void |
_save(java.io.OutputStream os,
XmlOptions options)
|
void |
_save(java.io.Writer w)
|
void |
_save(java.io.Writer w,
XmlOptions options)
|
void |
_selectPath(java.lang.String path)
|
void |
_selectPath(java.lang.String pathExpr,
XmlOptions options)
|
boolean |
_setAttributeText(javax.xml.namespace.QName attrName,
java.lang.String value)
|
void |
_setBookmark(XmlCursor.XmlBookmark bookmark)
|
void |
_setName(javax.xml.namespace.QName name)
|
void |
_setTextValue(char[] sourceChars,
int offset,
int length)
|
void |
_setTextValue(java.lang.String text)
|
boolean |
_toBookmark(XmlCursor.XmlBookmark bookmark)
|
boolean |
_toChild(int index)
|
boolean |
_toChild(javax.xml.namespace.QName name)
|
boolean |
_toChild(javax.xml.namespace.QName name,
int index)
|
boolean |
_toChild(java.lang.String local)
|
boolean |
_toChild(java.lang.String uri,
java.lang.String local)
|
boolean |
_toCursor(Cursor other)
|
void |
_toEndDoc()
|
XmlCursor.TokenType |
_toEndToken()
|
boolean |
_toFirstAttribute()
|
boolean |
_toFirstChild()
|
XmlCursor.TokenType |
_toFirstContentToken()
|
boolean |
_toLastAttribute()
|
boolean |
_toLastChild()
|
boolean |
_toNextAttribute()
|
XmlCursor.XmlBookmark |
_toNextBookmark(java.lang.Object key)
|
int |
_toNextChar(int maxCharacterCount)
|
boolean |
_toNextSelection()
|
boolean |
_toNextSibling(javax.xml.namespace.QName name)
|
boolean |
_toNextSibling(java.lang.String name)
|
boolean |
_toNextSibling(java.lang.String uri,
java.lang.String local)
|
XmlCursor.TokenType |
_toNextToken()
|
boolean |
_toParent()
|
boolean |
_toPrevAttribute()
|
XmlCursor.XmlBookmark |
_toPrevBookmark(java.lang.Object key)
|
int |
_toPrevChar(int maxCharacterCount)
|
boolean |
_toPrevSibling()
|
XmlCursor.TokenType |
_toPrevToken()
|
boolean |
_toSelection(int i)
|
void |
_toStartDoc()
|
java.lang.String |
_xmlText()
|
java.lang.String |
_xmlText(XmlOptions options)
|
void |
addToSelection()
Appends the current location of the cursor to the selection. |
void |
beginElement(javax.xml.namespace.QName name)
Inserts a new element around this cursor, giving the element the specified qualified name. |
void |
beginElement(java.lang.String localName)
Inserts a new element around this cursor, giving the element the specified local name. |
void |
beginElement(java.lang.String localName,
java.lang.String uri)
Inserts a new element around this cursor, giving the element the specified local name and associating it with the specified namespace. |
void |
clearBookmark(java.lang.Object key)
Clears the bookmark whose key is specified, if the bookmark exists at this cursor's location. |
void |
clearSelections()
Clears this cursor's selection, but does not modify the document. |
int |
comparePosition(XmlCursor xOther)
Returns an integer indicating whether this cursor is before, after, or at the same position as the specified cursor. |
int |
copyChars(int cch,
XmlCursor xTo)
Copies characters to the position immediately after the specified cursor. |
boolean |
copyXml(XmlCursor xTo)
Copies the XML immediately after this cursor to the location specified by the toHere cursor. |
boolean |
copyXmlContents(XmlCursor xTo)
Copies the contents of the container (STARTDOC OR START) immediately to the right of the cursor to the location specified by the toHere cursor. |
XmlCursor.TokenType |
currentTokenType()
Returns the type of the current token. |
void |
dispose()
Deallocates resources needed to manage the cursor, rendering this cursor inoperable. |
XmlDocumentProperties |
documentProperties()
Returns the XmlDocumentProperties object for the document this token source is associated with. |
void |
dump()
Prints to stdout the state of the document in which this token source is positioned. |
void |
dump(java.io.PrintStream o)
|
XmlCursor |
execQuery(java.lang.String query)
Executes the specified XQuery expression against the XML this cursor is in. |
XmlCursor |
execQuery(java.lang.String query,
XmlOptions options)
Executes the specified XQuery expression against the XML this cursor is in, and using the specified options. |
void |
getAllBookmarkRefs(java.util.Collection listToFill)
Retrieves all the bookmarks at this location, adding them to the specified collection. |
void |
getAllNamespaces(java.util.Map addToThis)
Adds to the specified map, all the namespaces in scope at the container where this cursor is positioned. |
java.lang.String |
getAttributeText(javax.xml.namespace.QName attrName)
When at a START or STARTDOC, returns the attribute text for the given attribute. |
XmlCursor.XmlBookmark |
getBookmark(java.lang.Object key)
Retrieves the bookmark with the specified key at this cursor's location. |
java.lang.String |
getChars()
Returns characters to the right of the cursor up to the next token. |
int |
getChars(char[] chars,
int offset,
int cch)
Copies characters up to the specified maximum number, counting right from this cursor's location to the character at maxCharacterCount. |
XmlCursor.ChangeStamp |
getDocChangeStamp()
Returns the current change stamp for the document the current cursor is in. |
Node |
getDomNode()
Returns a W3C DOM Node containing the XML represented by this source. |
javax.xml.namespace.QName |
getName()
Returns the name of the current token. |
org.apache.xmlbeans.impl.store.Locale.ChangeListener |
getNextChangeListener()
|
XmlObject |
getObject()
Returns the strongly-typed XmlObject at the current START, STARTDOC, or ATTR. |
int |
getSelectionCount()
Returns the count of the current selection. |
java.lang.String |
getTextValue()
Gets the text value of the current document, element, attribute, comment, procinst or text token. |
int |
getTextValue(char[] chars,
int offset,
int cch)
Copies the text value of the current document, element, attribute, comment, processing instruction or text token, counting right from this cursor's location up to maxCharacterCount, and copies the returned text into returnedChars. |
boolean |
hasNextSelection()
Returns whether or not there is a next selection. |
boolean |
hasNextToken()
True if there is a next token. |
boolean |
hasPrevToken()
True if there is a previous token. |
void |
insertAttribute(javax.xml.namespace.QName name)
Inserts a new attribute immediately before this cursor's location, giving it the specified name. |
void |
insertAttribute(java.lang.String localName)
Inserts a new attribute immediately before this cursor's location, giving it the specified local name. |
void |
insertAttribute(java.lang.String localName,
java.lang.String uri)
Inserts a new attribute immediately before this cursor's location, giving it the specified local name and associating it with the specified namespace. |
void |
insertAttributeWithValue(javax.xml.namespace.QName name,
java.lang.String value)
Inserts an attribute immediately before the cursor's location, giving it the specified name and value. |
void |
insertAttributeWithValue(java.lang.String Name,
java.lang.String value)
Inserts a new attribute immediately before this cursor's location, giving it the specified value and name. |
void |
insertAttributeWithValue(java.lang.String name,
java.lang.String uri,
java.lang.String value)
Inserts an attribute immediately before the cursor's location, giving it the specified name and value, and associating it with the specified namespace. |
void |
insertChars(java.lang.String text)
Inserts the specified text immediately before this cursor's location. |
void |
insertComment(java.lang.String text)
Inserts an XML comment immediately before the cursor's location, giving it the specified content. |
void |
insertElement(javax.xml.namespace.QName name)
Inserts an element immediately before this cursor's location, giving the element the specified qualified name. |
void |
insertElement(java.lang.String localName)
Inserts an element immediately before this cursor's location, giving the element the specified local name. |
void |
insertElement(java.lang.String localName,
java.lang.String uri)
Inserts a new element immediately before this cursor's location, giving the element the specified local name and associating it with specified namespace |
void |
insertElementWithText(javax.xml.namespace.QName name,
java.lang.String text)
Inserts a new element immediately before this cursor's location, giving the element the specified qualified name and content. |
void |
insertElementWithText(java.lang.String localName,
java.lang.String text)
Inserts a new element immediately before this cursor's location, giving the element the specified local name and content. |
void |
insertElementWithText(java.lang.String localName,
java.lang.String uri,
java.lang.String text)
Inserts a new element immediately before this cursor's location, giving the element the specified local name, associating it with the specified namespace, and giving it the specified content. |
void |
insertNamespace(java.lang.String prefix,
java.lang.String namespace)
Inserts a namespace declaration immediately before the cursor's location, giving it the specified prefix and URI. |
void |
insertProcInst(java.lang.String target,
java.lang.String text)
Inserts an XML processing instruction immediately before the cursor's location, giving it the specified target and text. |
boolean |
isAnyAttr()
True if this token is any attribute. |
boolean |
isAtSamePositionAs(XmlCursor xOther)
Determines if this cursor is at the same position as the specified cursor. |
boolean |
isAttr()
True if this token is an ATTR token type, meaning just before an attribute. |
boolean |
isComment()
True if this token is a COMMENT token type, meaning just before a comment. |
boolean |
isContainer()
True if this token is a container token. |
boolean |
isEnd()
True if this token is an END token type, meaning just before an element's end. |
boolean |
isEnddoc()
True if this token is an ENDDOC token type, meaning at the very end of the document. |
boolean |
isFinish()
True if this token is a finish token. |
boolean |
isInSameDocument(XmlCursor xOther)
Determines if the specified cursor is in the same document as this cursor. |
boolean |
isLeftOf(XmlCursor xOther)
Determines if this cursor is to the left of (or before) the specified cursor. |
boolean |
isNamespace()
True if this token is a NAMESPACE token type, meaning just before a namespace declaration. |
boolean |
isProcinst()
True if this token is a PROCINST token type, meaning just before a processing instruction. |
boolean |
isRightOf(XmlCursor xOther)
Determines if this cursor is to the right of (or after) the specified cursor. |
boolean |
isStart()
True if this token is a START token type, meaning just before an element's start. |
boolean |
isStartdoc()
True if the current token is a STARTDOC token type, meaning at the very root of the document. |
boolean |
isText()
True if the this token is a TEXT token type, meaning just before or inside text. |
java.lang.Object |
monitor()
Returns the synchronization object for the document. |
int |
moveChars(int cch,
XmlCursor xTo)
Moves characters immediately after this cursor to the position immediately after the specified cursor. |
boolean |
moveXml(XmlCursor xTo)
Moves the XML immediately after this cursor to the location specified by the toHere cursor, shifting XML at that location to the right to make room. |
boolean |
moveXmlContents(XmlCursor xTo)
Moves the contents of the container (STARTDOC OR START) immediately after this cursor to the location specified by the toHere cursor. |
java.lang.String |
namespaceForPrefix(java.lang.String prefix)
Returns the namespace URI indicated by the given prefix. |
XmlCursor |
newCursor()
Returns a new XML cursor. |
static XmlCursor |
newCursor(org.apache.xmlbeans.impl.store.Xobj x,
int p)
|
Node |
newDomNode()
Returns a W3C DOM Node containing the XML represented by this source. |
Node |
newDomNode(XmlOptions options)
Just like newDomNode() but with options. |
java.io.InputStream |
newInputStream()
Returns a new stream containing standard XML text, encoded according to the given encoding. |
java.io.InputStream |
newInputStream(XmlOptions options)
Just like newInputStream(String encoding) but with options. |
java.io.Reader |
newReader()
Returns a new character reader containing XML text. |
java.io.Reader |
newReader(XmlOptions options)
Just like newReader() but with options. |
XMLInputStream |
newXMLInputStream()
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API. |
XMLInputStream |
newXMLInputStream(XmlOptions options)
Deprecated. XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API. |
javax.xml.stream.XMLStreamReader |
newXMLStreamReader()
Returns a new XMLStreamReader. |
javax.xml.stream.XMLStreamReader |
newXMLStreamReader(XmlOptions options)
Just like newXMLInputStream() but with options. |
void |
notifyChange()
|
boolean |
pop()
Restores the cursor location most recently saved with the push() method. |
java.lang.String |
prefixForNamespace(java.lang.String namespaceURI)
Returns a prefix that can be used to indicate a namespace URI. |
XmlCursor.TokenType |
prevTokenType()
Returns the type of the previous token. |
void |
push()
Saves the current location of this cursor on an internal stack of saved positions (independent of selection). |
boolean |
removeAttribute(javax.xml.namespace.QName attrName)
When at a START or STARTDOC, removes the attribute with the given name. |
int |
removeChars(int cch)
Removes characters up to the specified maximum number, counting right from this cursor's location to the character at maxCharacterCount. |
boolean |
removeXml()
Removes the XML that is immediately after this cursor. |
boolean |
removeXmlContents()
Removes the contents of the container (STARTDOC OR START) immediately after this cursor. |
void |
save(ContentHandler ch,
LexicalHandler lh)
Writes the XML represented by this source to the given SAX content and lexical handlers. |
void |
save(ContentHandler ch,
LexicalHandler lh,
XmlOptions options)
Writes the XML represented by this source to the given SAX content and lexical handlers. |
void |
save(java.io.File file)
Writes the XML represented by this source to the given File. |
void |
save(java.io.File file,
XmlOptions options)
Writes the XML represented by this source to the given File. |
void |
save(java.io.OutputStream os)
Writes the XML represented by this source to the given output stream. |
void |
save(java.io.OutputStream os,
XmlOptions options)
Writes the XML represented by this source to the given output stream. |
void |
save(java.io.Writer w)
Writes the XML represented by this source to the given output. |
void |
save(java.io.Writer w,
XmlOptions options)
Writes the XML represented by this source to the given output. |
void |
selectPath(java.lang.String path)
Executes the specified XPath expression against the XML that this cursor is in. |
void |
selectPath(java.lang.String path,
XmlOptions options)
Executes the specified XPath expression against the XML that this cursor is in. |
boolean |
setAttributeText(javax.xml.namespace.QName attrName,
java.lang.String value)
When at a START or STARTDOC, sets the attribute text for the given attribute. |
void |
setBookmark(XmlCursor.XmlBookmark bookmark)
Sets a bookmark to the document at this cursor's location. |
void |
setName(javax.xml.namespace.QName name)
Sets the name of the current token. |
void |
setNextChangeListener(org.apache.xmlbeans.impl.store.Locale.ChangeListener listener)
|
void |
setTextValue(char[] sourceChars,
int offset,
int length)
Sets the text value of the XML at this cursor's location (if that XML's token type is START, STARTDOC, ATTR, COMMENT or PROCINST) to the contents of the specified character array. |
void |
setTextValue(java.lang.String text)
Sets the text value of the XML at this cursor's location if that XML's token type is START, STARTDOC, ATTR, COMMENT or PROCINST. |
boolean |
toBookmark(XmlCursor.XmlBookmark bookmark)
Moves this cursor to the same position as the bookmark. |
boolean |
toChild(int index)
Moves the cursor to the child element specified by index. |
boolean |
toChild(javax.xml.namespace.QName name)
Moves the cursor to the first child element of the specified qualified name. |
boolean |
toChild(javax.xml.namespace.QName name,
int index)
Moves the cursor to the specified index child element of the specified name, where that element is the . |
boolean |
toChild(java.lang.String name)
Moves the cursor to the first child element of the specified name in no namespace. |
boolean |
toChild(java.lang.String namespace,
java.lang.String name)
Moves the cursor to the first child element of the specified name in the specified namespace. |
boolean |
toCursor(XmlCursor xOther)
Moves this cursor to the same position as the moveTo cursor. |
void |
toEndDoc()
Moves the cursor to the ENDDOC token, which is the end of the document. |
XmlCursor.TokenType |
toEndToken()
Moves the cursor to the END or ENDDOC token corresponding to the current START or STARTDOC, and returns END or ENDDOC. |
boolean |
toFirstAttribute()
Moves the cursor to the first attribute of this element, or returns false and does not move the cursor if there are no attributes. |
boolean |
toFirstChild()
Moves the cursor to the first child element, or returns false and does not move the cursor if there are no element children. |
XmlCursor.TokenType |
toFirstContentToken()
Moves the cursor to the first token in the content of the current START or STARTDOC. |
boolean |
toLastAttribute()
Moves the cursor to the last attribute of this element, or returns false and does not move the cursor if there are no attributes. |
boolean |
toLastChild()
Moves the cursor to the last element child, or returns false and does not move the cursor if there are no element children. |
boolean |
toNextAttribute()
Moves the cursor to the next sibling attribute, or returns false and does not move the cursor if there is no next sibling attribute. |
XmlCursor.XmlBookmark |
toNextBookmark(java.lang.Object key)
Moves this cursor to the location after its current position where a bookmark with the given key exists. |
int |
toNextChar(int cch)
Moves the cursor forward by the specified number of characters, and stops at the next non-TEXT token. |
boolean |
toNextSelection()
Moves this cursor to the next location in the selection, if any. |
boolean |
toNextSibling()
Moves the cursor to the next sibling element, or returns false and does not move the cursor if there is no next sibling element. |
boolean |
toNextSibling(javax.xml.namespace.QName name)
Moves the cursor to the next sibling element of the specified qualified name. |
boolean |
toNextSibling(java.lang.String name)
Moves the cursor to the next sibling element of the specified name in no namespace. |
boolean |
toNextSibling(java.lang.String namespace,
java.lang.String name)
Moves the cursor to the next sibling element of the specified name in the specified namespace. |
XmlCursor.TokenType |
toNextToken()
Moves the cursor to the next token. |
boolean |
toParent()
Moves the cursor to the parent element or STARTDOC, or returns false and does not move the cursor if there is no parent. Works if you're in attributes or content. |
boolean |
toPrevAttribute()
Moves the cursor to the previous sibling attribute, or returns false and does not move the cursor if there is no previous sibling attribute. |
XmlCursor.XmlBookmark |
toPrevBookmark(java.lang.Object key)
Moves this cursor to the location before its current position where a bookmark with the given key exists. |
int |
toPrevChar(int cch)
Moves the cursor backwards by the number of characters given. |
boolean |
toPrevSibling()
Moves the cursor to the previous sibling element, or returns false and does not move the cursor if there is no previous sibling element. |
XmlCursor.TokenType |
toPrevToken()
Moves the cursor to the previous token. |
boolean |
toSelection(int i)
Moves this cursor to the specified location in the selection. |
void |
toStartDoc()
Moves the cursor to the STARTDOC token, which is the root of the document. |
java.lang.String |
xmlText()
Returns standard XML text. |
java.lang.String |
xmlText(XmlOptions options)
Just like xmlText() but with options. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void dump(java.io.PrintStream o)
public void _dispose()
public XmlCursor _newCursor()
public javax.xml.namespace.QName _getName()
public void _setName(javax.xml.namespace.QName name)
public XmlCursor.TokenType _currentTokenType()
public boolean _isStartdoc()
public boolean _isEnddoc()
public boolean _isStart()
public boolean _isEnd()
public boolean _isText()
public boolean _isAttr()
public boolean _isNamespace()
public boolean _isComment()
public boolean _isProcinst()
public boolean _isContainer()
public boolean _isFinish()
public boolean _isAnyAttr()
public XmlCursor.TokenType _toNextToken()
public XmlCursor.TokenType _toPrevToken()
public java.lang.Object _monitor()
public boolean _toParent()
public XmlCursor.ChangeStamp _getDocChangeStamp()
public XMLInputStream _newXMLInputStream()
public javax.xml.stream.XMLStreamReader _newXMLStreamReader()
public Node _newDomNode()
public java.io.InputStream _newInputStream()
public java.lang.String _xmlText()
public java.io.Reader _newReader()
public void _save(java.io.File file) throws java.io.IOException
java.io.IOException
public void _save(java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public void _save(java.io.Writer w) throws java.io.IOException
java.io.IOException
public void _save(ContentHandler ch, LexicalHandler lh) throws SAXException
SAXException
public XmlDocumentProperties _documentProperties()
public javax.xml.stream.XMLStreamReader _newXMLStreamReader(XmlOptions options)
public XMLInputStream _newXMLInputStream(XmlOptions options)
public java.lang.String _xmlText(XmlOptions options)
public java.io.InputStream _newInputStream(XmlOptions options)
public java.io.Reader _newReader(XmlOptions options)
public void _save(ContentHandler ch, LexicalHandler lh, XmlOptions options) throws SAXException
SAXException
public void _save(java.io.File file, XmlOptions options) throws java.io.IOException
java.io.IOException
public void _save(java.io.OutputStream os, XmlOptions options) throws java.io.IOException
java.io.IOException
public void _save(java.io.Writer w, XmlOptions options) throws java.io.IOException
java.io.IOException
public Node _getDomNode()
public Node _newDomNode(XmlOptions options)
public boolean _toCursor(Cursor other)
public void _push()
public boolean _pop()
public void notifyChange()
public void setNextChangeListener(org.apache.xmlbeans.impl.store.Locale.ChangeListener listener)
public org.apache.xmlbeans.impl.store.Locale.ChangeListener getNextChangeListener()
public void _selectPath(java.lang.String path)
public void _selectPath(java.lang.String pathExpr, XmlOptions options)
public boolean _hasNextSelection()
public boolean _toNextSelection()
public boolean _toSelection(int i)
public int _getSelectionCount()
public void _addToSelection()
public void _clearSelections()
public java.lang.String _namespaceForPrefix(java.lang.String prefix)
public java.lang.String _prefixForNamespace(java.lang.String ns)
public void _getAllNamespaces(java.util.Map addToThis)
public XmlObject _getObject()
public XmlCursor.TokenType _prevTokenType()
public boolean _hasNextToken()
public boolean _hasPrevToken()
public XmlCursor.TokenType _toFirstContentToken()
public XmlCursor.TokenType _toEndToken()
public boolean _toChild(java.lang.String local)
public boolean _toChild(javax.xml.namespace.QName name)
public boolean _toChild(int index)
public boolean _toChild(java.lang.String uri, java.lang.String local)
public boolean _toChild(javax.xml.namespace.QName name, int index)
public int _toNextChar(int maxCharacterCount)
public int _toPrevChar(int maxCharacterCount)
public boolean _toPrevSibling()
public boolean _toLastChild()
public boolean _toFirstChild()
public boolean _toNextSibling(java.lang.String name)
public boolean _toNextSibling(java.lang.String uri, java.lang.String local)
public boolean _toNextSibling(javax.xml.namespace.QName name)
public boolean _toFirstAttribute()
public boolean _toLastAttribute()
public boolean _toNextAttribute()
public boolean _toPrevAttribute()
public java.lang.String _getAttributeText(javax.xml.namespace.QName attrName)
public boolean _setAttributeText(javax.xml.namespace.QName attrName, java.lang.String value)
public boolean _removeAttribute(javax.xml.namespace.QName attrName)
public java.lang.String _getTextValue()
public int _getTextValue(char[] chars, int offset, int max)
public void _setTextValue(java.lang.String text)
public void _setTextValue(char[] sourceChars, int offset, int length)
public java.lang.String _getChars()
public int _getChars(char[] buf, int off, int cch)
public void _toStartDoc()
public void _toEndDoc()
public int _comparePosition(Cursor other)
public boolean _isLeftOf(Cursor other)
public boolean _isAtSamePositionAs(Cursor other)
public boolean _isRightOf(Cursor other)
public XmlCursor _execQuery(java.lang.String query)
public XmlCursor _execQuery(java.lang.String query, XmlOptions options)
public boolean _toBookmark(XmlCursor.XmlBookmark bookmark)
public XmlCursor.XmlBookmark _toNextBookmark(java.lang.Object key)
public XmlCursor.XmlBookmark _toPrevBookmark(java.lang.Object key)
public void _setBookmark(XmlCursor.XmlBookmark bookmark)
public XmlCursor.XmlBookmark _getBookmark(java.lang.Object key)
public void _clearBookmark(java.lang.Object key)
public void _getAllBookmarkRefs(java.util.Collection listToFill)
public boolean _removeXml()
public boolean _moveXml(Cursor to)
public boolean _copyXml(Cursor to)
public boolean _removeXmlContents()
public boolean _moveXmlContents(Cursor to)
public boolean _copyXmlContents(Cursor to)
public int _removeChars(int cch)
public int _moveChars(int cch, Cursor to)
public int _copyChars(int cch, Cursor to)
public void _insertChars(java.lang.String text)
public void _beginElement(java.lang.String localName)
public void _beginElement(java.lang.String localName, java.lang.String uri)
public void _beginElement(javax.xml.namespace.QName name)
public void _insertElement(java.lang.String localName)
public void _insertElement(java.lang.String localName, java.lang.String uri)
public void _insertElement(javax.xml.namespace.QName name)
public void _insertElementWithText(java.lang.String localName, java.lang.String text)
public void _insertElementWithText(java.lang.String localName, java.lang.String uri, java.lang.String text)
public void _insertElementWithText(javax.xml.namespace.QName name, java.lang.String text)
public void _insertAttribute(java.lang.String localName)
public void _insertAttribute(java.lang.String localName, java.lang.String uri)
public void _insertAttribute(javax.xml.namespace.QName name)
public void _insertAttributeWithValue(java.lang.String localName, java.lang.String value)
public void _insertAttributeWithValue(java.lang.String localName, java.lang.String uri, java.lang.String value)
public void _insertAttributeWithValue(javax.xml.namespace.QName name, java.lang.String text)
public void _insertNamespace(java.lang.String prefix, java.lang.String namespace)
public void _insertComment(java.lang.String text)
public void _insertProcInst(java.lang.String target, java.lang.String text)
public void _dump()
public boolean moveXml(XmlCursor xTo)
XmlCursor
moveXml
in interface XmlCursor
xTo
- The cursor at the location to which the XML should
be moved.
public boolean copyXml(XmlCursor xTo)
XmlCursor
copyXml
in interface XmlCursor
xTo
- The cursor at the location to which the XML should
be copied.
public boolean moveXmlContents(XmlCursor xTo)
XmlCursor
moveXmlContents
in interface XmlCursor
xTo
- The cursor at the location to which the XML should be moved.
public boolean copyXmlContents(XmlCursor xTo)
XmlCursor
copyXmlContents
in interface XmlCursor
xTo
- The cursor at the location to which the XML should
be copied.
public int moveChars(int cch, XmlCursor xTo)
XmlCursor
moveChars
in interface XmlCursor
cch
- The maximum number of characters after this cursor's
location to move.xTo
- The cursor to which the characters should be moved.
public int copyChars(int cch, XmlCursor xTo)
XmlCursor
copyChars
in interface XmlCursor
cch
- The maximum number of characters after this cursor's
location to copy.xTo
- The cursor to which the characters should be copied.
public boolean toCursor(XmlCursor xOther)
XmlCursor
toCursor
in interface XmlCursor
xOther
- The cursor at the location to which this cursor
should be moved.
public boolean isInSameDocument(XmlCursor xOther)
XmlCursor
isInSameDocument
in interface XmlCursor
xOther
- The cursor that may be in the same document
as this cursor.
public int comparePosition(XmlCursor xOther)
XmlCursor
a.comparePosition(b) < 0
means a is to the left of b.a.comparePosition(b) == 0
means a is at the same position as b.a.comparePosition(b) > 0
means a is to the right of b.
comparePosition
in interface XmlCursor
xOther
- The cursor whose position should be compared
with this cursor.
public boolean isLeftOf(XmlCursor xOther)
XmlCursor
a.comparePosition(b) < 0
isLeftOf
in interface XmlCursor
xOther
- The cursor whose position should be compared
with this cursor.
public boolean isAtSamePositionAs(XmlCursor xOther)
XmlCursor
a.comparePosition(b) == 0
isAtSamePositionAs
in interface XmlCursor
xOther
- The cursor whose position should be compared
with this cursor.
public boolean isRightOf(XmlCursor xOther)
XmlCursor
a.comparePosition(b) > 0
isRightOf
in interface XmlCursor
xOther
- The cursor whose position should be compared
with this cursor.
public static XmlCursor newCursor(org.apache.xmlbeans.impl.store.Xobj x, int p)
public void dispose()
XmlCursor
dispose
in interface XmlCursor
public java.lang.Object monitor()
XmlTokenSource
monitor
in interface XmlTokenSource
public XmlDocumentProperties documentProperties()
XmlTokenSource
documentProperties
in interface XmlTokenSource
public XmlCursor newCursor()
XmlTokenSource
newCursor
in interface XmlTokenSource
public javax.xml.stream.XMLStreamReader newXMLStreamReader()
XmlTokenSource
newXMLStreamReader
in interface XmlTokenSource
public javax.xml.stream.XMLStreamReader newXMLStreamReader(XmlOptions options)
XmlTokenSource
newXMLStreamReader
in interface XmlTokenSource
XmlOptions
public XMLInputStream newXMLInputStream()
XmlTokenSource
newXMLInputStream
in interface XmlTokenSource
public java.lang.String xmlText()
XmlTokenSource
The text returned represents the document contents starting at the current begin-tag or begin-document and ending at the matching end-tag or end-document. This is same content as newReader, but it is returned as a single string.
Throws an IllegalStateException if the XmlTokenSource is not positioned at begin-tag or begin-document (e.g., if it is at an attribute).
Note that this method does not produce XML with the XML declaration,
including the encoding information. To save the XML declaration with
the XML, see XmlTokenSource.save(OutputStream)
or XmlTokenSource.save(OutputStream, XmlOptions)
.
xmlText
in interface XmlTokenSource
public java.io.InputStream newInputStream()
XmlTokenSource
newInputStream
in interface XmlTokenSource
public java.io.Reader newReader()
XmlTokenSource
newReader
in interface XmlTokenSource
public Node newDomNode()
XmlTokenSource
newDomNode
in interface XmlTokenSource
public Node getDomNode()
XmlTokenSource
getDomNode
in interface XmlTokenSource
public void save(ContentHandler ch, LexicalHandler lh) throws SAXException
XmlTokenSource
XmlTokenSource.save(OutputStream)
,
XmlTokenSource.save(OutputStream, XmlOptions)
, XmlTokenSource.save(File)
or XmlTokenSource.save(File, XmlOptions)
.
save
in interface XmlTokenSource
SAXException
public void save(java.io.File file) throws java.io.IOException
XmlTokenSource
save
in interface XmlTokenSource
java.io.IOException
public void save(java.io.OutputStream os) throws java.io.IOException
XmlTokenSource
save
in interface XmlTokenSource
java.io.IOException
public void save(java.io.Writer w) throws java.io.IOException
XmlTokenSource
XmlTokenSource.save(OutputStream)
,
XmlTokenSource.save(OutputStream, XmlOptions)
, XmlTokenSource.save(File)
or XmlTokenSource.save(File, XmlOptions)
.
save
in interface XmlTokenSource
java.io.IOException
public XMLInputStream newXMLInputStream(XmlOptions options)
XmlTokenSource
Just like newXMLInputStream() but with any of a number of options. Use the options parameter to specify the following:
To specify this | Use this method |
---|---|
The character encoding to use when converting the character data in the XML to bytess. | XmlOptions.setCharacterEncoding(java.lang.String) |
Prefix-to-namespace mappings that should be assumed when saving this XML. This is useful when the resulting XML will be part of a larger XML document, ensuring that this inner document will take advantage of namespaces defined in the outer document. | XmlOptions.setSaveImplicitNamespaces(java.util.Map) |
Suggested namespace prefixes to use when saving. Used only when a namespace attribute needs to be synthesized. | XmlOptions.setSaveSuggestedPrefixes(java.util.Map) |
That namespace attributes should occur first in elements when the XML is saved. By default, they occur last. | XmlOptions.setSaveNamespacesFirst() |
The XML should be pretty printed when saved. Note that this should only be used for debugging. | XmlOptions.setSavePrettyPrint() |
The number of spaces to use when indenting for pretty printing. The default is 2. | XmlOptions.setSavePrettyPrintIndent(int) |
The additional number of spaces indented from the left for pretty printed XML. | XmlOptions.setSavePrettyPrintOffset(int) |
To minimize the number of namespace attributes generated for the saved XML. Note that this can reduce performance significantly. | XmlOptions.setSaveAggresiveNamespaces() |
To reduce the size of the saved document by allowing the use of the default namespace. Note that this can potentially change the semantic meaning of the XML if unprefixed QNames are present as the value of an attribute or element. | XmlOptions.setUseDefaultNamespace() |
To filter out processing instructions with the specified target name. | XmlOptions.setSaveFilterProcinst(java.lang.String) |
Change the QName of the synthesized root element when saving. This replaces "xml-fragment" with "fragment" in the namespace http://www.openuri.org/fragment | XmlOptions.setSaveUseOpenFrag() |
Saving should begin on the element's contents. | XmlOptions.setSaveInner() |
Saving should begin on the element, rather than its contents. | XmlOptions.setSaveOuter() |
To rename the document element, or to specify the document element for this XML. | XmlOptions.setSaveSyntheticDocumentElement(javax.xml.namespace.QName) |
newXMLInputStream
in interface XmlTokenSource
options
- Any of the described options.
XmlOptions
public java.lang.String xmlText(XmlOptions options)
XmlTokenSource
Note that this method does not produce XML with the XML declaration,
including the encoding information. To save the XML declaration with
the XML, see XmlTokenSource.save(OutputStream)
or XmlTokenSource.save(OutputStream, XmlOptions)
.
xmlText
in interface XmlTokenSource
XmlOptions
public java.io.InputStream newInputStream(XmlOptions options)
XmlTokenSource
newInputStream
in interface XmlTokenSource
XmlOptions
public java.io.Reader newReader(XmlOptions options)
XmlTokenSource
newReader
in interface XmlTokenSource
XmlOptions
public Node newDomNode(XmlOptions options)
XmlTokenSource
newDomNode
in interface XmlTokenSource
XmlOptions
public void save(ContentHandler ch, LexicalHandler lh, XmlOptions options) throws SAXException
XmlTokenSource
XmlTokenSource.save(OutputStream)
,
XmlTokenSource.save(OutputStream, XmlOptions)
, XmlTokenSource.save(File)
or XmlTokenSource.save(File, XmlOptions)
.
save
in interface XmlTokenSource
SAXException
public void save(java.io.File file, XmlOptions options) throws java.io.IOException
XmlTokenSource
save
in interface XmlTokenSource
java.io.IOException
public void save(java.io.OutputStream os, XmlOptions options) throws java.io.IOException
XmlTokenSource
save
in interface XmlTokenSource
java.io.IOException
public void save(java.io.Writer w, XmlOptions options) throws java.io.IOException
XmlTokenSource
XmlTokenSource.save(OutputStream)
,
XmlTokenSource.save(OutputStream, XmlOptions)
, XmlTokenSource.save(File)
or XmlTokenSource.save(File, XmlOptions)
.
save
in interface XmlTokenSource
java.io.IOException
public void push()
XmlCursor
push
in interface XmlCursor
public boolean pop()
XmlCursor
pop
in interface XmlCursor
public void selectPath(java.lang.String path)
XmlCursor
XmlCursor.hasNextSelection()
and XmlCursor.toNextSelection()
(similar to
Iterator
).cursor.selectPath("./purchase-order/line-item");Note that this method does not support top-level XPath functions.
selectPath
in interface XmlCursor
path
- The path expression to execute.public void selectPath(java.lang.String path, XmlOptions options)
XmlCursor
cursor.selectPath("./purchase-order/line-item");Note that this method does not support top-level XPath functions.
selectPath
in interface XmlCursor
path
- The path expression to execute.options
- Options for the query. For example, you can call
the XmlOptions.setXqueryCurrentNodeVar(String)
method to specify a particular name for the query expression
variable that indicates the context node.public boolean hasNextSelection()
XmlCursor
hasNextSelection
in interface XmlCursor
public boolean toNextSelection()
XmlCursor
XmlCursor.selectPath(java.lang.String)
and XmlCursor.addToSelection()
methods.
toNextSelection
in interface XmlCursor
public boolean toSelection(int i)
XmlCursor
toSelection
in interface XmlCursor
i
- The index of the desired location.
public int getSelectionCount()
XmlCursor
getSelectionCount
in interface XmlCursor
public void addToSelection()
XmlCursor
addToSelection
in interface XmlCursor
public void clearSelections()
XmlCursor
clearSelections
in interface XmlCursor
public boolean toBookmark(XmlCursor.XmlBookmark bookmark)
XmlCursor
toBookmark
in interface XmlCursor
bookmark
- The bookmark at the location to which this
cursor should be moved.
public XmlCursor.XmlBookmark toNextBookmark(java.lang.Object key)
XmlCursor
toNextBookmark
in interface XmlCursor
key
- The key held by the next bookmark at the location to
which this cursor should be moved.
public XmlCursor.XmlBookmark toPrevBookmark(java.lang.Object key)
XmlCursor
toPrevBookmark
in interface XmlCursor
key
- The key held by the previous bookmark at the location to
which this cursor should be moved.
public javax.xml.namespace.QName getName()
XmlCursor
In the following example, xmlObject
represents
an XML instance whose root element is not preceded by any other XML.
This code prints the root element name (here, the local name, or
name without URI).
XmlCursor cursor = xmlObject.newCursor(); cursor.toFirstContentToken(); String elementName = cursor.getName().getLocalPart(); System.out.println(elementName);
getName
in interface XmlCursor
public void setName(javax.xml.namespace.QName name)
XmlCursor
setName
in interface XmlCursor
name
- The new name for the current token.public java.lang.String namespaceForPrefix(java.lang.String prefix)
XmlCursor
namespaceForPrefix
in interface XmlCursor
prefix
- The namespace prefix for the requested namespace.
public java.lang.String prefixForNamespace(java.lang.String namespaceURI)
XmlCursor
prefixForNamespace
in interface XmlCursor
namespaceURI
- The namespace URI corresponding to the requested
prefix.
public void getAllNamespaces(java.util.Map addToThis)
XmlCursor
getAllNamespaces
in interface XmlCursor
addToThis
- The Map to add the namespaces to.public XmlObject getObject()
XmlCursor
getObject
in interface XmlCursor
public XmlCursor.TokenType currentTokenType()
XmlCursor
currentTokenType
in interface XmlCursor
public boolean isStartdoc()
XmlCursor
isStartdoc
in interface XmlCursor
public boolean isEnddoc()
XmlCursor
isEnddoc
in interface XmlCursor
public boolean isStart()
XmlCursor
isStart
in interface XmlCursor
public boolean isEnd()
XmlCursor
isEnd
in interface XmlCursor
public boolean isText()
XmlCursor
isText
in interface XmlCursor
public boolean isAttr()
XmlCursor
isAttr
in interface XmlCursor
public boolean isNamespace()
XmlCursor
isNamespace
in interface XmlCursor
public boolean isComment()
XmlCursor
isComment
in interface XmlCursor
public boolean isProcinst()
XmlCursor
isProcinst
in interface XmlCursor
public boolean isContainer()
XmlCursor
isContainer
in interface XmlCursor
public boolean isFinish()
XmlCursor
isFinish
in interface XmlCursor
public boolean isAnyAttr()
XmlCursor
isAnyAttr
in interface XmlCursor
public XmlCursor.TokenType prevTokenType()
XmlCursor
prevTokenType
in interface XmlCursor
public boolean hasNextToken()
XmlCursor
hasNextToken
in interface XmlCursor
public boolean hasPrevToken()
XmlCursor
hasPrevToken
in interface XmlCursor
public XmlCursor.TokenType toNextToken()
XmlCursor
toNextToken
in interface XmlCursor
public XmlCursor.TokenType toPrevToken()
XmlCursor
toPrevToken
in interface XmlCursor
public XmlCursor.TokenType toFirstContentToken()
XmlCursor
toFirstContentToken
in interface XmlCursor
public XmlCursor.TokenType toEndToken()
XmlCursor
toEndToken
in interface XmlCursor
public int toNextChar(int cch)
XmlCursor
toNextChar
in interface XmlCursor
cch
- The maximum number of characters by which
the cursor should be moved.
public int toPrevChar(int cch)
XmlCursor
toNextChar
method.
toPrevChar
in interface XmlCursor
cch
- The maximum number of characters by which
the cursor should be moved.
public boolean ___toNextSibling()
public boolean toNextSibling()
XmlCursor
toNextSibling
in interface XmlCursor
public boolean toPrevSibling()
XmlCursor
toPrevSibling
in interface XmlCursor
public boolean toParent()
XmlCursor
toParent
in interface XmlCursor
public boolean toFirstChild()
XmlCursor
toFirstChild
in interface XmlCursor
public boolean toLastChild()
XmlCursor
toLastChild
in interface XmlCursor
public boolean toChild(java.lang.String name)
XmlCursor
toChild
in interface XmlCursor
name
- The name of the element to move the cursor to.
public boolean toChild(java.lang.String namespace, java.lang.String name)
XmlCursor
toChild
in interface XmlCursor
namespace
- The namespace URI for the element to move the cursor
to.name
- The name of the element to move to.
public boolean toChild(javax.xml.namespace.QName name)
XmlCursor
toChild
in interface XmlCursor
name
- The name of the element to move the cursor to.public boolean toChild(int index)
XmlCursor
toChild
in interface XmlCursor
index
- The position of the element in the sequence of child
elements.
public boolean toChild(javax.xml.namespace.QName name, int index)
XmlCursor
toChild
in interface XmlCursor
name
- The name of the child element to move the cursor to.index
- The position of the element in the sequence of child
elements.
public boolean toNextSibling(java.lang.String name)
XmlCursor
toNextSibling
in interface XmlCursor
name
- The name of the element to move the cursor to.
public boolean toNextSibling(java.lang.String namespace, java.lang.String name)
XmlCursor
toNextSibling
in interface XmlCursor
namespace
- The namespace URI for the element to move the cursor
to.name
- The name of the element to move the cursor to.
public boolean toNextSibling(javax.xml.namespace.QName name)
XmlCursor
toNextSibling
in interface XmlCursor
name
- The name of the element to move the cursor to.
public boolean toFirstAttribute()
XmlCursor
XmlCursor cursor = ... //cursor on START or STARTDOC if (cursor.toFirstAttribute()) { do { // do something using attribute's name and value cursor.getName(); cursor.getTextValue(); } while (cursor.toNextAttribute()); }
toFirstAttribute
in interface XmlCursor
public boolean toLastAttribute()
XmlCursor
toLastAttribute
in interface XmlCursor
public boolean toNextAttribute()
XmlCursor
toNextAttribute
in interface XmlCursor
XmlCursor.toFirstAttribute()
public boolean toPrevAttribute()
XmlCursor
toPrevAttribute
in interface XmlCursor
public java.lang.String getAttributeText(javax.xml.namespace.QName attrName)
XmlCursor
getAttributeText
in interface XmlCursor
attrName
- The name of the attribute whose value is requested.
public boolean setAttributeText(javax.xml.namespace.QName attrName, java.lang.String value)
XmlCursor
setAttributeText
in interface XmlCursor
attrName
- The name of the attribute whose value is being set.value
- The new value for the attribute.
public boolean removeAttribute(javax.xml.namespace.QName attrName)
XmlCursor
removeAttribute
in interface XmlCursor
attrName
- The name of the attribute that should be removed.
public java.lang.String getTextValue()
XmlCursor
IllegalStateException
.
getTextValue
in interface XmlCursor
public int getTextValue(char[] chars, int offset, int cch)
XmlCursor
IllegalStateException
.
getTextValue
in interface XmlCursor
chars
- A character array to hold the returned characters.offset
- The position within returnedChars to which the first of the
returned characters should be copied.cch
- The maximum number of characters after this cursor's
location to copy. A negative value specifies that all characters should be copied.
public void setTextValue(java.lang.String text)
XmlCursor
setTextValue
in interface XmlCursor
text
- The text to use as a new value.public void setTextValue(char[] sourceChars, int offset, int length)
XmlCursor
setTextValue
in interface XmlCursor
sourceChars
- A character array containing the XML's new value.offset
- The position within sourceChars from which the first of
the source characters should be copied.length
- The maximum number of characters to set as the XML's new
value.public java.lang.String getChars()
XmlCursor
getChars
in interface XmlCursor
public int getChars(char[] chars, int offset, int cch)
XmlCursor
getChars
in interface XmlCursor
chars
- A character array to hold the returned characters.offset
- The position within returnedChars at which the first of the
returned characters should be added.cch
- The maximum number of characters after this cursor's
location to return.
public void toStartDoc()
XmlCursor
toStartDoc
in interface XmlCursor
public void toEndDoc()
XmlCursor
toEndDoc
in interface XmlCursor
public XmlCursor execQuery(java.lang.String query)
XmlCursor
XmlCursor results = cursor.execQuery("purchase-order/line-item[price <= 20.00]");
execQuery
in interface XmlCursor
query
- The XQuery expression to execute.
public XmlCursor execQuery(java.lang.String query, XmlOptions options)
XmlCursor
execQuery
in interface XmlCursor
query
- The XQuery expression to execute.options
- Options for the query. For example, you can call
the XmlOptions.setXqueryCurrentNodeVar(String)
method to specify a particular name for the query expression
variable that indicates the context node.public XmlCursor.ChangeStamp getDocChangeStamp()
XmlCursor
getDocChangeStamp
in interface XmlCursor
public void setBookmark(XmlCursor.XmlBookmark bookmark)
XmlCursor
setBookmark
in interface XmlCursor
bookmark
- The bookmark to set.public XmlCursor.XmlBookmark getBookmark(java.lang.Object key)
XmlCursor
getKey
method is not overridden on
the bookmark, then the bookmark's class is used as the key.
getBookmark
in interface XmlCursor
key
- The key for the bookmark to retrieve.
public void clearBookmark(java.lang.Object key)
XmlCursor
clearBookmark
in interface XmlCursor
key
- The for the bookmark to clear.public void getAllBookmarkRefs(java.util.Collection listToFill)
XmlCursor
getAllBookmarkRefs
in interface XmlCursor
listToFill
- The collection that will contain bookmarks
returned by this method.public boolean removeXml()
XmlCursor
removeXml
in interface XmlCursor
public boolean removeXmlContents()
XmlCursor
removeXmlContents
in interface XmlCursor
public int removeChars(int cch)
XmlCursor
removeChars
in interface XmlCursor
cch
- The maximum number of characters after this cursor's
location to remove.
public void insertChars(java.lang.String text)
XmlCursor
insertChars
in interface XmlCursor
text
- The text to insert.public void insertElement(javax.xml.namespace.QName name)
XmlCursor
insertElement
in interface XmlCursor
name
- The qualified name for the element.public void insertElement(java.lang.String localName)
XmlCursor
insertElement
in interface XmlCursor
localName
- The local name for the new element.public void insertElement(java.lang.String localName, java.lang.String uri)
XmlCursor
insertElement
in interface XmlCursor
localName
- The local name for the new element.uri
- The URI for the new element's namespace.public void beginElement(javax.xml.namespace.QName name)
XmlCursor
beginElement
in interface XmlCursor
name
- The qualified name for the new element.public void beginElement(java.lang.String localName)
XmlCursor
beginElement
in interface XmlCursor
localName
- The local name for the new element.public void beginElement(java.lang.String localName, java.lang.String uri)
XmlCursor
beginElement
in interface XmlCursor
localName
- The local name for the new element.uri
- The URI for the new element's namespace.public void insertElementWithText(javax.xml.namespace.QName name, java.lang.String text)
XmlCursor
insertElementWithText
in interface XmlCursor
name
- The qualified name for the new element.text
- The content for the new element.public void insertElementWithText(java.lang.String localName, java.lang.String text)
XmlCursor
insertElementWithText
in interface XmlCursor
localName
- The local name for the new element.text
- The content for the new element.public void insertElementWithText(java.lang.String localName, java.lang.String uri, java.lang.String text)
XmlCursor
insertElementWithText
in interface XmlCursor
localName
- The local name for the new element.uri
- The URI for the new element's namespace.text
- The content for the new element.public void insertAttribute(java.lang.String localName)
XmlCursor
insertAttribute
in interface XmlCursor
localName
- The local name for the new attribute.public void insertAttribute(java.lang.String localName, java.lang.String uri)
XmlCursor
insertAttribute
in interface XmlCursor
localName
- The local name for the new attribute.uri
- The URI for the new attribute's namespace.public void insertAttribute(javax.xml.namespace.QName name)
XmlCursor
insertAttribute
in interface XmlCursor
name
- The local name for the new attribute.public void insertAttributeWithValue(java.lang.String Name, java.lang.String value)
XmlCursor
insertAttributeWithValue
in interface XmlCursor
Name
- The local name for the new attribute.value
- The value for the new attribute.public void insertAttributeWithValue(java.lang.String name, java.lang.String uri, java.lang.String value)
XmlCursor
insertAttributeWithValue
in interface XmlCursor
name
- The name for the new attribute.uri
- The URI for the new attribute's namespace.value
- The value for the new attribute.public void insertAttributeWithValue(javax.xml.namespace.QName name, java.lang.String value)
XmlCursor
insertAttributeWithValue
in interface XmlCursor
name
- The name for the new attribute.value
- The value for the new attribute.public void insertNamespace(java.lang.String prefix, java.lang.String namespace)
XmlCursor
insertNamespace
in interface XmlCursor
prefix
- The prefix for the namespace.namespace
- The URI for the namespace.public void insertComment(java.lang.String text)
XmlCursor
insertComment
in interface XmlCursor
text
- The new comment's content.public void insertProcInst(java.lang.String target, java.lang.String text)
XmlCursor
insertProcInst
in interface XmlCursor
target
- The target for the processing instruction.text
- The new processing instruction's text.public void dump()
XmlTokenSource
dump
in interface XmlTokenSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |