Android Programming Press on the image to return to the main documentation page.

XmlSax

This library provides an XML Sax Parser.
See this
tutorial for a working example.

List of types:

Attributes
SaxParser

Attributes

This object is passed in StartElement event.

Events:

None

Members:


  GetName (Index As Int) As String

  GetValue (Index As Int) As String

  GetValue2 (Uri As String, Name As String) As String

  IsInitialized As Boolean

  Size As Int [read only]

Members description:

GetName (Index As Int) As String
Returns the name of the attribute at the specified index.
Note that the order of elements can change.
GetValue (Index As Int) As String
Returns the value of the attribute at the specified index.
Note that the order of elements can change.
GetValue2 (Uri As String, Name As String) As String
Returns the value of the attribute with the following Uri and Name.
Pass an empty string as the Uri if namespaces are not used.
Returns an empty string if no such attribute was found.
IsInitialized As Boolean
Size As Int [read only]
Returns the number of attributes in this element.

SaxParser

A parser that sequentially reads a stream and raises events at the beginning and end of each element.
The StartElement includes the following parameters:
Uri - Namespace Uri, or empty string if there is no namespace.
Name - The element name.
Attributes - An Attributes object holding the element's attributes.

The EndElement includes the following parameters:
Uri - Namespace Uri, or empty string if there is no namespace.
Name - The element name.
Text - The element text (if such exists).

Events:

StartElement (Uri As String, Name As String, Attributes As Attributes)
EndElement (Uri As String, Name As String, Text As StringBuilder)

Members:


  Initialize

  Parents As List

  Parse (InputStream As java.io.InputStream, EventName As String)

  Parse2 (TextReader As java.io.Reader, EventName As String)

Members description:

Initialize
Initializes the object.
Usually this object should be a process global object.
Parents As List
A list that holds the names of the parents elements.
During parsing you can use this list to recognize the current element.
Parse (InputStream As java.io.InputStream, EventName As String)
Parses the given InputStream.
EventName - The events subs name prefix.
Parse2 (TextReader As java.io.Reader, EventName As String)
Parses the given TextReader.
EventName - The events subs name prefix.
Top