public class XMLParserMemory extends Object
Constructor and Description |
---|
XMLParserMemory(boolean isHtml) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
comment()
Returns the xml comment buffer.
|
StringBuilder |
current()
The current text buffer.
|
void |
currentAttr(String attr)
Sets the encountered attribute.
|
StringBuilder |
currentEntity()
Returns the current entity buffer.
|
void |
currentTag(String content)
Set the encountered tag.
|
void |
flushNameSpace()
Flushes the namespace memory.
|
Map<String,String> |
getAttributes()
Returns a map of all attributes and their value found on the current tag.
|
String |
getCurrentTag()
Returns the current tag.
|
String |
getNameSpace()
Get the current namespace.
|
String |
getStoredString() |
boolean |
hasCurrentAttribute()
true if there is a currentAttribute
|
char |
lastChar() |
void |
lastChar(char c)
Set the last char
|
void |
namespace(String ns)
Sets the current namespace.
|
StringBuilder |
processingInstruction()
Returns the xml processing instruction buffer
|
void |
putCurrentAttrValue(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(String storedString) |
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(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(String content)
content
- the tag
public void currentAttr(String attr)
attr
- the attribute
public boolean hasCurrentAttribute()
public void putCurrentAttrValue(String content)
content
- the current attributes value.
public StringBuilder current()
public String getCurrentTag()
public Map<String,String> getAttributes()
public StringBuilder currentEntity()
public StringBuilder comment()
public StringBuilder processingInstruction()
public String whitespaceTag()
InsideTagHTMLState
, only for HTML processing.
public void whitespaceTag(String tag)
InsideTagHTMLState
, only for HTML processing.
tag
- the tag
public void namespace(String ns)
ns
- the current namespace
public void flushNameSpace()
public String getNameSpace()
public void resetBuffer()
public void lastChar(char c)
c
- the char
public char lastChar()
public String getStoredString()
public void setStoredString(String storedString)
Copyright © 1998–2024. All rights reserved.