473,240 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 software developers and data experts.

DOCTYPE Declaration using XmlSerializer

raj
Can any one let me know how I can DOCTYPE (DTD declaration) to the XML
generated by XmlSerializer
Nov 12 '05 #1
3 4861


raj wrote:
Can any one let me know how I can DOCTYPE (DTD declaration) to the XML
generated by XmlSerializer


Why do you need a DTD, with XML serialization there is a mapping between
..NET types and W3C XML schema types so there is no need for a DTD as the
schema describes the structure and types of the serialized XML.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
raj
I need to send this XML to a website, which is expecting the DOCTYPE
declaration in the xml.

"Martin Honnen" wrote:


raj wrote:
Can any one let me know how I can DOCTYPE (DTD declaration) to the XML
generated by XmlSerializer


Why do you need a DTD, with XML serialization there is a mapping between
..NET types and W3C XML schema types so there is no need for a DTD as the
schema describes the structure and types of the serialized XML.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #3
raj wrote:
I need to send this XML to a website, which is expecting the DOCTYPE
declaration in the xml.


You can easily write simple custom XmlWriter, which emits DOCTYPE when
the document being written - inherit XmltextWriter, override
WriteStartDocument(), call base.WriteStartDocument() and then add call
to WriteDocType().
Then serialize via instance of this XmlWriter.
Tell me if you have any troubles implementing it.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ken Larson | last post by:
I have a question about using XSL to extract information from an SVG (XML) file that has a DOCTYPE/DTD declaration. I am able to do this successfully if I write my own SVG files without such a...
2
by: Tony T | last post by:
I'm not a regular here - strictly an amateur web developer - but I've got so frustrated I'd really appreciate any help anyone can give. I'm working on a PC platform with Win ME. I'm developing a...
7
by: David Ross | last post by:
I manually code my HTML without using any page generating software. I need to know how to specify the DOCTYPE at the beginning of my HTML files. No, I don't want a "canned" DOCTYPE statement. ...
2
by: Mullin Yu | last post by:
I am using XmlSerializer to serialize an object to xml string like the following at C#. Now, I want to know how can I 1. change the default encoding to utf-8 or others, instead of utf-16 2....
6
by: David B. Bitton | last post by:
I am having a problem deserializing XML when the root node is missing a namespace declaration. My Type has an XmlTypeAttribute with a namespace defined. If I attempt to deserialize the XML, I get...
3
by: Vlad | last post by:
I have a class that serialize using the XmlSerializer. I am using several attributes for class members to control serialization process. One thing I cannot figure out how to do is how to add...
29
by: AndyZa | last post by:
According to the w3c specs a web page is not valid if the DOCTYPE declaration is missing. So, if I add the following doctype to my pages they will be "compliant": <!DOCTYPE HTML PUBLIC...
6
by: Rolf Welskes | last post by:
Hello, if I have for example: <table style="width: 100%; height: 100%;" border="1"> <tr> <td style="width: 100px">k </td> <td style="width: 100px">k </td> </tr>
0
drhowarddrfine
by: drhowarddrfine | last post by:
The Doctype or DTD Many coders get confused by all the talk of doctypes and how they affect browsers and the display of their web pages. This article will get right to the point about doctypes...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.