This document is archived and information here might be outdated. Recommended version. |
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 | |
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