This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Classes > X > XMLReader CoClass (ArcObjects .NET 10.5 SDK) |
An XML sequential document reader.
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 | 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. |
IXMLReader2 | Provides access to members that control the sequential reading of XML. |
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.
IXMLReader Interface | IXMLStream Interface | IXMLWriter Interface | IXMLSerialize Interface