XML

  • Thread starter Thread starter ats@jbex
  • Start date Start date
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
 
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.
 
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
 
Back
Top