I'm new to the .NET framework (and actually consider myself more of a sysadmin) but am creating a web service that needs to return data to another system. I was using the defaults from the ASP.NET Web Service Application project. The problem that I am having is I can't find a setting to use an alternate DTD. So by default the project returns this when I return a simple object I get something like this
<?xml version="1.0" encoding="utf-8"?>
<foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://foo.com">
<foo1>1</foo1>
<bar>2</bar>
<baz>3</baz>
</foo> `
When what I really would like is something like this ...
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE ivr_info SYSTEM "http://www.mybz.com/xml/ivr.dtd">
<response>
<result>
<ivr_info>
<variables>
<variable>
<name>foo1</name>
<value>1</value>
</variable>
<variable>
<name>bar</name>
<value>2</value>
</variable>
</variables>
</ivr_info>
</result>
</response>
I have the DTD for the new format is there a way to import that into a web service or do I need to drop down to a more base level and just write out and parse the incoming streams? Thanks in advance for any information.