public class XMLParserMemory
extends java.lang.Object
Constructor | Description |
---|---|
XMLParserMemory(boolean isHtml) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.StringBuilder |
comment() |
Returns the xml comment buffer.
|
java.lang.StringBuilder |
current() |
The current text buffer.
|
void |
currentAttr(java.lang.String attr) |
Sets the encountered attribute.
|
java.lang.StringBuilder |
currentEntity() |
Returns the current entity buffer.
|
void |
currentTag(java.lang.String content) |
Set the encountered tag.
|
void |
flushNameSpace() |
Flushes the namespace memory.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes() |
Returns a map of all attributes and their value found on the current tag.
|
java.lang.String |
getCurrentTag() |
Returns the current tag.
|
java.lang.String |
getNameSpace() |
Get the current namespace.
|
java.lang.String |
getStoredString() |
|
boolean |
hasCurrentAttribute() |
true if there is a currentAttribute
|
char |
lastChar() |
|
void |
lastChar(char c) |
Set the last char
|
void |
namespace(java.lang.String ns) |
Sets the current namespace.
|
java.lang.StringBuilder |
processingInstruction() |
Returns the xml processing instruction buffer
|
void |
putCurrentAttrValue(java.lang.String content) |
Sets the current attribute value and adds the attribute (if it's not
null) to the attribute map.
|
void |
resetBuffer() |
Resets the ByteArrayOutputStream of this class.
|
void |
setStoredString(java.lang.String storedString) |
|
java.lang.String |
whitespaceTag() |
Returns last tag that needs to be taken into account for HTML Whitespace handling.
Used by InsideTagHTMLState , only for HTML processing. |
void |
whitespaceTag(java.lang.String tag) |
Sets the last tag that needs to be taken into account for HTML Whitespace handling.
Used by InsideTagHTMLState , only for HTML processing. |
public void currentTag(java.lang.String content)
content
- the tagpublic void currentAttr(java.lang.String attr)
attr
- the attributepublic boolean hasCurrentAttribute()
public void putCurrentAttrValue(java.lang.String content)
content
- the current attributes value.public java.lang.StringBuilder current()
public java.lang.String getCurrentTag()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public java.lang.StringBuilder currentEntity()
public java.lang.StringBuilder comment()
public java.lang.StringBuilder processingInstruction()
public java.lang.String whitespaceTag()
InsideTagHTMLState
, only for HTML processing.public void whitespaceTag(java.lang.String tag)
InsideTagHTMLState
, only for HTML processing.tag
- the tagpublic void namespace(java.lang.String ns)
ns
- the current namespacepublic void flushNameSpace()
public java.lang.String getNameSpace()
public void resetBuffer()
public void lastChar(char c)
c
- the charpublic char lastChar()
public java.lang.String getStoredString()
public void setStoredString(java.lang.String storedString)
Copyright © 1998–2018. All rights reserved.