![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: MXXML Writer creates only empty files [Thread Next] Re: MXXML Writer creates only empty filesTo: NULL Date: 8/3/2005 5:36:00 AM Hi Marvin,
thank you for your reply.
> - xDoc.loadXml( wrt.output ) at the end instead of "wrt.output =3D
> xmlDoc"
The result is still the same. The file is created but it's empty.
Regards
Thomas
Private Sub text_xml()
Dim cnth As IVBSAXContentHandler
Dim dtdh As IVBSAXDTDHandler
Dim lexh As IVBSAXLexicalHandler
Dim dech As IVBSAXDeclHandler
Dim errh As IVBSAXErrorHandler
Dim atrs As New SAXAttributes30
Dim rdr As New SAXXMLReader30
Dim wrt As New MXXMLWriter30
Dim xmlDoc As New MSXML2.DOMDocument30
xmlDoc.validateOnParse =3D False
'wrt.output =3D xmlDoc
wrt.Encoding =3D "UTF-8"
wrt.indent =3D True
wrt.omitXMLDeclaration =3D False
Set cnth =3D wrt
Set dtdh =3D wrt
Set lexh =3D wrt
Set dech =3D wrt
Set errh =3D wrt
cnth.startDocument
cnth.processingInstruction "xml", "version=3D'1.0'"
lexh.startDTD "MyDTD", "", "http://eureka.sample/mydtd.dtd"
lexh.endDTD
atrs.addAttribute "", "", "cover", "", "hard"
cnth.startElement "", "", "book", atrs
atrs.Clear
cnth.startElement "", "", "title", atrs
cnth.Characters "Some special characters: =E4=C4=F6=D6=FC=DC=DF"
cnth.endElement "", "", "title"
cnth.endElement "", "", "book"
cnth.endDocument
wrt.flush
msgbox wrt.output
xmlDoc.loadXML (wrt.output)
xmlDoc.Save ("c:\sample.xml")
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
