Yes.
You may use MXXMLWriter (an IMXWriter interface implementation class) to build the XML documents using SAX. Here is an example:
Start Visual Basic 6.0, create a standard EXE project, add reference (Project | References) to MSXML 4.0, and write the following code in the Form_Load method:
Dim writer As New MXXMLWriter40
Dim CH As IVBSAXContentHandler
Dim attrib As IVBSAXAttributes
writer.encoding = "UTF-8"
writer.indent = True
Set CH = writer
CH.startDocument
CH.startElement "", "", "WebSites", attrib
CH.characters "perfectxml.com"
CH.endElement "", "", "WebSites"
CH.endDocument
MsgBox writer.output
The book XML Application Development with MSXML 4.0 containing many more examples of using SAX to create documents using MXXMLWriter.
|