This document is archived and information here might be outdated.  Recommended version.


XMLReader Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Classes > X > XMLReader Class
ArcGIS Developer Help

XMLReaderClass Class

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
IXMLReader Provides access to members that control the sequential reading of XML.
IXMLReader2 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

IXMLReader Interface | IXMLStream Interface | IXMLWriter Interface | IXMLSerialize Interface