|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnanoxml.XMLElement
public class XMLElement
This class is modified from nanoxml.XMLElement.
The reason to modify the original class is small memory of embeded devices.
| Nested Class Summary | |
|---|---|
static class |
XMLElement.FakeProperties
|
| Field Summary | |
|---|---|
static int |
NANOXML_MAJOR_VERSION
|
static int |
NANOXML_MINOR_VERSION
|
| Constructor Summary | |
|---|---|
XMLElement()
|
|
| Method Summary | |
|---|---|
void |
attribute(java.lang.String key,
java.lang.String value)
|
void |
content(java.lang.String value)
|
XMLElement |
createInstance()
|
protected java.lang.String |
decodeString(java.lang.String s,
int lineNr)
Converts &...; sequences to "normal" chars. |
void |
endElement(java.lang.String name)
|
java.lang.String |
getContents()
Returns the #PCDATA content of the object. |
int |
getLineNr()
Returns the line nr on which the element is found. |
java.lang.String |
getTagName()
Returns the class (i.e. the name indicated in the tag) of the object. |
int |
parseArray(byte[] input,
int offset,
int end)
Parses an XML definition starting at offset. |
int |
parseArray(byte[] input,
int offset,
int end,
int startingLineNr)
Parses an XML definition starting at offset. |
protected int |
scanChildren(byte[] input,
int contentOffset,
int contentSize,
int contentLineNr)
!!! |
void |
setContent(java.lang.String content)
Changes the content string. |
void |
setTagName(java.lang.String tagName)
Changes the tag name. |
protected int |
skipBogusTag(byte[] input,
int offset,
int end,
int[] lineNr)
Skips a tag that don't contain any useful data: <?...? |
void |
startElement(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NANOXML_MAJOR_VERSION
public static final int NANOXML_MINOR_VERSION
| Constructor Detail |
|---|
public XMLElement()
| Method Detail |
|---|
public void startElement(java.lang.String name)
throws XMLParseException
XMLParseException
public void content(java.lang.String value)
throws XMLParseException
XMLParseException
public void attribute(java.lang.String key,
java.lang.String value)
throws XMLParseException
XMLParseException
public void endElement(java.lang.String name)
throws XMLParseException
XMLParseExceptionpublic XMLElement createInstance()
public java.lang.String getContents()
null is returned.
public int getLineNr()
public java.lang.String getTagName()
public int parseArray(byte[] input,
int offset,
int end)
throws XMLParseException
XMLParseException - if an error occured while parsing the array
public int parseArray(byte[] input,
int offset,
int end,
int startingLineNr)
throws XMLParseException
XMLParseException - if an error occured while parsing the array
protected int scanChildren(byte[] input,
int contentOffset,
int contentSize,
int contentLineNr)
throws XMLParseException
null.
XMLParseException - if an error occured while parsing the arrayXMLElement#parseCharArraypublic void setContent(java.lang.String content)
content - The new content string.public void setTagName(java.lang.String tagName)
tagName - The new tag name.
protected int skipBogusTag(byte[] input,
int offset,
int end,
int[] lineNr)
XMLParseException - if an error occured while parsing the array
protected java.lang.String decodeString(java.lang.String s,
int lineNr)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||