com.caucho.quercus.lib.xml
Class XmlReader

java.lang.Object
  extended by com.caucho.quercus.lib.xml.XmlReader

public class XmlReader
extends java.lang.Object


Field Summary
static int ATTRIBUTE
           
static int CDATA
           
static int COMMENT
           
static int DEFAULTATTRS
           
static int DOC
           
static int DOC_FRAGMENT
           
static int DOC_TYPE
           
static int ELEMENT
           
static int END_ELEMENT
           
static int END_ENTITY
           
static int ENTITY
           
static int ENTITY_REF
           
static int LOADDTD
           
static int NONE
           
static int NOTATION
           
static int PI
           
static int SIGNIFICANT_WHITESPACE
           
static int SUBST_ENTITIES
           
static int TEXT
           
static int VALIDATE
           
static int WHITESPACE
           
static int XML_DECLARATION
           
 
Constructor Summary
XmlReader(java.lang.String[] string)
          Default constructor.
 
Method Summary
 BooleanValue close()
          Closes the reader.
 Value expand()
           
 StringValue getAttribute(java.lang.String name)
           
 Value getAttributeCount()
          Returns the number of attributes of the current element.
 StringValue getAttributeNo(int index)
           
 StringValue getAttributeNS(java.lang.String localName, java.lang.String namespaceURI)
           
 Value getBaseURI()
          Returns the base uniform resource locator of the current element.
 Value getDepth()
          Returns the depth of the current element.
 Value getHasAttributes()
          Determines whether this element has attributes.
 Value getHasValue()
          Determines whether this element has content.
 Value getIsDefault()
          Determines whether this element is default.
 Value getIsEmptyElement()
          Determines whether this element is empty.
 Value getLocalName()
          Determines whether this element has attributes.
 Value getName(Env env)
          Returns the name of the current element.
 Value getNamespaceURI()
          Returns the namespace uniform resource locator of the current element.
 LongValue getNextType()
           
 Value getNodeType()
          Returns the node type of the current element.
 BooleanValue getParserProperty(int property)
           
 Value getPrefix()
          Returns the prefix of the current element.
 Value getValue()
          Returns the value of the current element.
 Value getXmlLang()
          Returns the node type of the current element.
 BooleanValue isValid()
           
 BooleanValue lookupNamespace(java.lang.String prefix)
           
 BooleanValue moveToAttribute(java.lang.String name)
           
 BooleanValue moveToAttributeNo(int index)
           
 BooleanValue moveToAttributeNs(java.lang.String localName, java.lang.String namespaceURI)
           
 BooleanValue moveToElement()
           
 BooleanValue moveToFirstAttribute()
           
 BooleanValue moveToNextAttribute()
           
 BooleanValue next(java.lang.String localname)
           
 BooleanValue open(Env env, Path path)
          Opens a stream using the uniform resource locator.
 BooleanValue read(Env env)
          Moves the cursor to the next node.
 BooleanValue setParserProperty(int property, boolean value)
           
 BooleanValue setRelaxNGSchema(java.lang.String filename)
           
 BooleanValue setRelaxNGSchemaSource(java.lang.String source)
           
 BooleanValue XML(java.lang.String source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

ELEMENT

public static final int ELEMENT
See Also:
Constant Field Values

ATTRIBUTE

public static final int ATTRIBUTE
See Also:
Constant Field Values

TEXT

public static final int TEXT
See Also:
Constant Field Values

CDATA

public static final int CDATA
See Also:
Constant Field Values

ENTITY_REF

public static final int ENTITY_REF
See Also:
Constant Field Values

ENTITY

public static final int ENTITY
See Also:
Constant Field Values

PI

public static final int PI
See Also:
Constant Field Values

COMMENT

public static final int COMMENT
See Also:
Constant Field Values

DOC

public static final int DOC
See Also:
Constant Field Values

DOC_TYPE

public static final int DOC_TYPE
See Also:
Constant Field Values

DOC_FRAGMENT

public static final int DOC_FRAGMENT
See Also:
Constant Field Values

NOTATION

public static final int NOTATION
See Also:
Constant Field Values

WHITESPACE

public static final int WHITESPACE
See Also:
Constant Field Values

SIGNIFICANT_WHITESPACE

public static final int SIGNIFICANT_WHITESPACE
See Also:
Constant Field Values

END_ELEMENT

public static final int END_ELEMENT
See Also:
Constant Field Values

END_ENTITY

public static final int END_ENTITY
See Also:
Constant Field Values

XML_DECLARATION

public static final int XML_DECLARATION
See Also:
Constant Field Values

LOADDTD

public static final int LOADDTD
See Also:
Constant Field Values

DEFAULTATTRS

public static final int DEFAULTATTRS
See Also:
Constant Field Values

VALIDATE

public static final int VALIDATE
See Also:
Constant Field Values

SUBST_ENTITIES

public static final int SUBST_ENTITIES
See Also:
Constant Field Values
Constructor Detail

XmlReader

public XmlReader(java.lang.String[] string)
Default constructor. XXX: Not completely sure what the passed in string(s) does.

Parameters:
string - not used
Method Detail

getAttributeCount

public Value getAttributeCount()
Returns the number of attributes of the current element.

Returns:
the count if it exists, otherwise null

getBaseURI

public Value getBaseURI()
Returns the base uniform resource locator of the current element.

Returns:
the URI, otherwise null

getDepth

public Value getDepth()
Returns the depth of the current element.

Returns:
the depth if it exists, otherwise null

getHasAttributes

public Value getHasAttributes()
Determines whether this element has attributes.

Returns:
true if this element has attributes, false if not, otherwise null

getHasValue

public Value getHasValue()
Determines whether this element has content.

Returns:
true if this element has content, false if not, otherwise null

getIsDefault

public Value getIsDefault()
Determines whether this element is default.

Returns:
true if this element is default, false if not, otherwise null

getIsEmptyElement

public Value getIsEmptyElement()
Determines whether this element is empty.

Returns:
true if this element is empty, false if not, otherwise null

getLocalName

public Value getLocalName()
Determines whether this element has attributes.

Returns:
true if this element has attributes, false if not, otherwise null

getName

public Value getName(Env env)
Returns the name of the current element.

Returns:
the name, otherwise null

getNamespaceURI

public Value getNamespaceURI()
Returns the namespace uniform resource locator of the current element.

Returns:
the namespace URI, otherwise null

getNodeType

public Value getNodeType()
Returns the node type of the current element.

Returns:
the node type, otherwise null

getPrefix

public Value getPrefix()
Returns the prefix of the current element.

Returns:
the prefix, otherwise null

getValue

public Value getValue()
Returns the value of the current element.

Returns:
the value, otherwise null

getXmlLang

public Value getXmlLang()
Returns the node type of the current element.

Returns:
the node type, otherwise null

close

public BooleanValue close()
Closes the reader.

Returns:
true if success, false otherwise

expand

public Value expand()
Returns:

getAttribute

public StringValue getAttribute(java.lang.String name)
Parameters:
name -
Returns:

getAttributeNo

public StringValue getAttributeNo(int index)
Parameters:
index -
Returns:

getAttributeNS

public StringValue getAttributeNS(java.lang.String localName,
                                  java.lang.String namespaceURI)
Parameters:
localName -
namespaceURI -
Returns:

getParserProperty

public BooleanValue getParserProperty(int property)
Parameters:
property -
Returns:

isValid

public BooleanValue isValid()
Returns:

lookupNamespace

public BooleanValue lookupNamespace(java.lang.String prefix)
Parameters:
prefix -
Returns:

moveToAttribute

public BooleanValue moveToAttribute(java.lang.String name)
Parameters:
name -
Returns:

moveToAttributeNo

public BooleanValue moveToAttributeNo(int index)
Parameters:
index -
Returns:

moveToAttributeNs

public BooleanValue moveToAttributeNs(java.lang.String localName,
                                      java.lang.String namespaceURI)
Parameters:
localName -
namespaceURI -
Returns:

moveToElement

public BooleanValue moveToElement()
Returns:

moveToFirstAttribute

public BooleanValue moveToFirstAttribute()
Returns:

moveToNextAttribute

public BooleanValue moveToNextAttribute()
Returns:

next

public BooleanValue next(java.lang.String localname)
Parameters:
localname -
Returns:

open

public BooleanValue open(Env env,
                         Path path)
Opens a stream using the uniform resource locator.

Parameters:
uri - uniform resource locator to open
Returns:
true if success, false otherwise

read

public BooleanValue read(Env env)
Moves the cursor to the next node.

Returns:
true if success, false otherwise

getNextType

public LongValue getNextType()

setParserProperty

public BooleanValue setParserProperty(int property,
                                      boolean value)
Parameters:
property -
value -
Returns:

setRelaxNGSchema

public BooleanValue setRelaxNGSchema(java.lang.String filename)
Parameters:
filename -
Returns:

setRelaxNGSchemaSource

public BooleanValue setRelaxNGSchemaSource(java.lang.String source)
Parameters:
source -
Returns:

XML

public BooleanValue XML(java.lang.String source)
Parameters:
source -
Returns: