FDO .NET API Reference Feature Data Objects
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OSGeo::FDO::Common::Xml::XmlReader Class Reference

Inherits OSGeo::FDO::Runtime::Disposable.

Inheritance diagram for OSGeo::FDO::Common::Xml::XmlReader:

[legend]
List of all members.

Detailed Description

XmlReader reads an XML document from a text or binary stream. As various document fragments are read, it calls the appropriate SAX Handler callback on the current SAX Handler. This object maintains a stack of SAX Handlers, with the current one being the top handler in the stack. Callers provide this object with SAX Handlers to customize the processing of the XML document. SAXHandler callbacks also provide a means to push other handlers onto the stack. For example, a SAX Handler for a particular XML element might push another handler to read a particular sub-element.


Public Member Functions

System::String * DecodeName (System::String *name)
 Utility function that is typically called for element names or name type attributes that were adjusted when they were written to XML. FDO names that correspond to XML names, but aren't valid XML names, are adjusted. This function undoes the name adjustment.
__property System::Boolean get_EOD ()
 Indicates whether the end of the XML document has been reached.
__property DictionaryElementCollectionget_Namespaces ()
 Returns all of the XML namespace declarations that are currently in-scope for the current position in the XML document being read.
__property OSGeo::FDO::Common::Io::IoStreamget_Stream ()
 Gets the underlying stream. If a text reader was passed to this object then the stream for this text reader is returned. If a stream was passed to this object then this stream is returned. If a file name as passed then a auto-generated stream (wrapped around the file) is returned.
__property OSGeo::FDO::Common::Io::IoTextReaderget_TextReader ()
 Gets the underlying text reader. If a text reader was passed to this object then this text reader is returned. Otherwise, an auto-generated text reader is returned (a text reader wrapped around the file name or stream that was passed to this object).
System::Boolean Parse (OSGeo::FDO::Common::Xml::IXmlSaxHandler *saxHandler, OSGeo::FDO::Common::Xml::XmlSaxContext *saxContext, System::Boolean incremental)
 Parses the XML document.
System::Boolean Parse (OSGeo::FDO::Common::Xml::IXmlSaxHandler *saxHandler, OSGeo::FDO::Common::Xml::XmlSaxContext *saxContext)
 Parses the XML document.
System::Boolean Parse (OSGeo::FDO::Common::Xml::IXmlSaxHandler *saxHandler)
 Parses the XML document.
System::Boolean Parse ()
 Parses the XML document.
System::String * PrefixToUri (System::String *prefix)
 Gets the URI for a namespace prefix.
 XmlReader (OSGeo::FDO::Common::Io::IoTextReader *reader)
 Constructs an XML reader on a text reader.
 XmlReader (OSGeo::FDO::Common::Io::IoStream *stream)
 Constructs an XML reader on a stream.
 XmlReader (System::String *fileName)
 Constructs an XML reader on a file.

Protected Member Functions

System::Void ReleaseUnmanagedObject ()
 DOXYGEN-IGNORE

Constructor & Destructor Documentation

OSGeo::FDO::Common::Xml::XmlReader::XmlReader System::String *  fileName  ) 
 

Constructs an XML reader on a file.

Parameters:
fileName Input name of the file to read.
Returns:
Returns XmlReader

OSGeo::FDO::Common::Xml::XmlReader::XmlReader OSGeo::FDO::Common::Io::IoStream stream  ) 
 

Constructs an XML reader on a stream.

Parameters:
stream Input the stream to read.
Returns:
Returns XmlReader

OSGeo::FDO::Common::Xml::XmlReader::XmlReader OSGeo::FDO::Common::Io::IoTextReader reader  ) 
 

Constructs an XML reader on a text reader.

Parameters:
reader Input the text reader.
Returns:
Returns XmlReader

Member Function Documentation

System::String* OSGeo::FDO::Common::Xml::XmlReader::DecodeName System::String *  name  ) 
 

Utility function that is typically called for element names or name type attributes that were adjusted when they were written to XML. FDO names that correspond to XML names, but aren't valid XML names, are adjusted. This function undoes the name adjustment.

Parameters:
name Input the name to decode.
Returns:
Returns the decoded name.

__property System::Boolean OSGeo::FDO::Common::Xml::XmlReader::get_EOD  ) 
 

Indicates whether the end of the XML document has been reached.

Returns:
Returns true if this reader is at the end of the document, false otherwise

__property DictionaryElementCollection* OSGeo::FDO::Common::Xml::XmlReader::get_Namespaces  ) 
 

Returns all of the XML namespace declarations that are currently in-scope for the current position in the XML document being read.

Returns:
Returns DictionaryElementCollection. The dictionary has one DictionaryElement entry per namespace declaration. DictionaryElement->GetName() returns the namespace prefix. DictionaryElement->GetValue() returns the URI.

__property OSGeo ::FDO ::Common ::Io ::IoStream* OSGeo::FDO::Common::Xml::XmlReader::get_Stream  ) 
 

Gets the underlying stream. If a text reader was passed to this object then the stream for this text reader is returned. If a stream was passed to this object then this stream is returned. If a file name as passed then a auto-generated stream (wrapped around the file) is returned.

Returns:
Returns the underlying stream

__property OSGeo ::FDO ::Common ::Io ::IoTextReader* OSGeo::FDO::Common::Xml::XmlReader::get_TextReader  ) 
 

Gets the underlying text reader. If a text reader was passed to this object then this text reader is returned. Otherwise, an auto-generated text reader is returned (a text reader wrapped around the file name or stream that was passed to this object).

Returns:
Returns the underlying text reader

System::Boolean OSGeo::FDO::Common::Xml::XmlReader::Parse OSGeo::FDO::Common::Xml::IXmlSaxHandler saxHandler,
OSGeo::FDO::Common::Xml::XmlSaxContext saxContext,
System::Boolean  incremental
 

Parses the XML document.

Parameters:
saxHandler Input SAX Handler to receive the SaxHandler events. This object is pushed onto the SAX Handler stack when parse() starts and popped when parse() is finished. If NULL then no handler is pushed, meaning that the current top SAX Handler receives the events. If saxHander is NULL and there is on current top SAX Handler then this function does a parse and reports syntax errors, but does no semantic processing.
saxContext Input Caller-specific contextual information that is pass to all SAX callbacks.
incremental Input true: an incremental (progressive) parse is performed. The first call to XmlReader::Parse() causes the XML document to be read from the current position until the XmlSaxHandler::EndElement() callback returns false or the end of the document is reached. On subsequent calls to Parse() the read continues where the previous call left off. false: the whole document is parsed in a single call to XmlReader::Parse(). The XmlSaxHandler::EndElement() return value is ignored. If a previous call was made to XmlReader::Parse(), with incremental = true, then the rest of the document is parsed ( the EndElement() return value is ignored ).
Returns:
Returns true if the end of the document has not yet been reached

System::Boolean OSGeo::FDO::Common::Xml::XmlReader::Parse OSGeo::FDO::Common::Xml::IXmlSaxHandler saxHandler,
OSGeo::FDO::Common::Xml::XmlSaxContext saxContext
 

Parses the XML document.

Parameters:
saxHandler Input SAX Handler to receive the SaxHandler events. This object is pushed onto the SAX Handler stack when parse() starts and popped when parse() is finished. If NULL then no handler is pushed, meaning that the current top SAX Handler receives the events. If saxHander is NULL and there is on current top SAX Handler then this function does a parse and reports syntax errors, but does no semantic processing.
saxContext Input Caller-specific contextual information that is pass to all SAX callbacks.
Returns:
Returns true if the end of the document has not yet been reached

System::Boolean OSGeo::FDO::Common::Xml::XmlReader::Parse OSGeo::FDO::Common::Xml::IXmlSaxHandler saxHandler  ) 
 

Parses the XML document.

Parameters:
saxHandler Input SAX Handler to receive the SaxHandler events. This object is pushed onto the SAX Handler stack when parse() starts and popped when parse() is finished. If NULL then no handler is pushed, meaning that the current top SAX Handler receives the events. If saxHander is NULL and there is on current top SAX Handler then this function does a parse and reports syntax errors, but does no semantic processing.
Returns:
Returns true if the end of the document has not yet been reached

System::Boolean OSGeo::FDO::Common::Xml::XmlReader::Parse  ) 
 

Parses the XML document.

Returns:
Returns true if the end of the document has not yet been reached

System::String* OSGeo::FDO::Common::Xml::XmlReader::PrefixToUri System::String *  prefix  ) 
 

Gets the URI for a namespace prefix.

Parameters:
prefix Input the namespace prefix.
Returns:
Returns the URI; L"" if the prefix is not in-scope at the current position in the XML document.

System::Void OSGeo::FDO::Common::Xml::XmlReader::ReleaseUnmanagedObject  )  [protected, virtual]
 

DOXYGEN-IGNORE

Reimplemented from OSGeo::FDO::Runtime::Disposable.


Comments or suggestions? Send us feedback.