XML

A

ats@jbex

I am using the XMLTextWriter to create an xml document. It goes as follows:

writer.WriteStartDocument

writer.WriteStartElement
writer.WriteEndElement
etc etc etc

writer.WriteEndDocument

The first line created is <?xml version="1.0" encoding="UTF-8"?>

Between this line and the first element I need to add the following:

<!DOCTYPE paymentService PUBLIC "DTD Name" "URL">

How do I add this line using the XMLTextWriter?

TIA
--
ats@jbex

No mercy for what we are doing
No thought to even what we have done
We don't need to feel the sorrow
No remorse for the helpless one

Metallica - No Remorse
 
Z

zacks

I am using the XMLTextWriter to create an xml document. It goes as follows:

writer.WriteStartDocument

writer.WriteStartElement
writer.WriteEndElement
etc etc etc

writer.WriteEndDocument

The first line created is <?xml version="1.0" encoding="UTF-8"?>

Between this line and the first element I need to add the following:

<!DOCTYPE paymentService PUBLIC "DTD Name" "URL">

How do I add this line using the XMLTextWriter?

As far as I am aware, the XMLTextWriter cannot write XML Comments.
 
A

ats@jbex

As far as I am aware, the XMLTextWriter cannot write XML Comments.

I found it. It is writer.WriteDocType. And for commennts use
writer.WriteComment.
--
ats@jbex

When Johnny comes marching home again
He's coming by bus or underground
A woman's eye will shed a tear
To see his face so beaten in fear
An' it was just around the corner in the English Civil War

The Clash - English Civil War
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MSgBox in VB.Net 2005 3
Dates 3
File types 4
trouble with xml writer 2
Problem Reading Xml file 9
XmlTextWriter & MemoryStream 2
Need help trying to create an XML file using VB .Net 3
Form to XML 2

Top