ArcObjects Library Reference (System)  

XMLReader CoClass

An XML sequential document reader.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
ISupportErrorInfo (esriSystem) Indicates whether a specific interface can return Automation error objects.
IXMLReader Provides access to members that control the sequential reading of XML.

Remarks

Use the XMLReader coclass when you wish to provide access to members that control the sequential reading of XML. XMLStream needs to be hooked-up in order to read the stream.

 

  '*** Create an XML stream and read into it from an XML file

  Dim pXMLStream As IXMLStream
  Set pXMLStream = New XmlStream
 
  pXMLStream.LoadFromFile "d:\temp\foo.xml"
 
  '*** Create a reader object and point it to the stream
 
  Dim pXMLReader As IXMLReader
  Set pXMLReader = New XMLReader
 
  pXMLReader.ReadFrom pXMLStream
 
  '*** Create an XML serializer and use it to deserialize the recordset object from
  '*** the stream using the XMLReader
 
  Dim pxmlserial As IXMLSerializer
  Dim pRecordSet As IRecordSet
 
  Set pxmlserial = New XMLSerializer
  Set pRecordSet = pxmlserial.ReadObject(pXMLReader, Nothing, Nothing)

See the IXMLReader interface for more on getting information about reading of objects.

See Also

IXMLSerialize Interface | IXMLStream Interface | IXMLWriter Interface | IXMLReader Interface