By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,278 Members | 2,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,278 IT Pros & Developers. It's quick & easy.

Response.Write for a XML string

P: n/a
All,

I have a well form block of XML that is stored in a C# string type and I
just simply want to display it in the browser using Response.Write but when I
try this I get the following error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
--------------------------------------------------------------------------------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/App1/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^
Nov 16 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
musk,

Basically, your XML is not well-formed, so the browser has problem
displaying it. The browser, by default, applies a stylesheet to the XML
document to show it with the nice tree structure that you are accustomed to.

Fix the errors in the XML returned, and it should work fine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
All,

I have a well form block of XML that is stored in a C# string type and I
just simply want to display it in the browser using Response.Write but
when I
try this I get the following error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
--------------------------------------------------------------------------------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/App1/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^

Nov 16 '05 #2

P: n/a
I think your comment should be
<!-- Title -->
rather than
<-- Title -->
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,

I don't get the nice tree stucture for some reason what am I doing wrong.

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
xml.Append ("<-- Title -->\r");
xml.Append ("<T1>\r");
xml.Append ("<Mssage>Some text</Message>\r");
xml.Append ("</T1>\r");

Response.Write (xml);

The display in the browser is as follows:

<-- Title --> Some text

"Nicholas Paldino [.NET/C# MVP]" wrote:
musk,

Basically, your XML is not well-formed, so the browser has problem
displaying it. The browser, by default, applies a stylesheet to the XML
document to show it with the nice tree structure that you are accustomed to.

Fix the errors in the XML returned, and it should work fine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
All,

I have a well form block of XML that is stored in a C# string type and I just simply want to display it in the browser using Response.Write but
when I
try this I get the following error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------

------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing resource 'http://localhost/App1/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^


Nov 16 '05 #3

P: n/a
And also;
<Mssage>Some text</Message>
should be
<Message>Some text</Message>

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Dennis Myrén" <de****@oslokb.no> wrote in message
news:tz*******************@news2.e.nsc.no...
I think your comment should be
<!-- Title -->
rather than
<-- Title -->
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,

I don't get the nice tree stucture for some reason what am I doing wrong.

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
xml.Append ("<-- Title -->\r");
xml.Append ("<T1>\r");
xml.Append ("<Mssage>Some text</Message>\r");
xml.Append ("</T1>\r");

Response.Write (xml);

The display in the browser is as follows:

<-- Title --> Some text

"Nicholas Paldino [.NET/C# MVP]" wrote:
musk,

Basically, your XML is not well-formed, so the browser has problem
displaying it. The browser, by default, applies a stylesheet to the XML document to show it with the nice tree structure that you are accustomed
to.
Fix the errors in the XML returned, and it should work fine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
> All,
>
> I have a well form block of XML that is stored in a C# string type
and
I > just simply want to display it in the browser using Response.Write
but > when I
> try this I get the following error:
>
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct the
error and > then click the Refresh button, or try again later.
>
>

--------------------------------------------------------------------------
------ >
> Cannot have a DOCTYPE declaration outside of a prolog. Error processing > resource 'http://localhost/App1/WebForm1.asp...
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> ----------^
>
>


Nov 16 '05 #4

P: n/a
msuk,

You also need to set the ContentType property on the response to
"text/xml".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,

I don't get the nice tree stucture for some reason what am I doing wrong.

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
xml.Append ("<-- Title -->\r");
xml.Append ("<T1>\r");
xml.Append ("<Mssage>Some text</Message>\r");
xml.Append ("</T1>\r");

Response.Write (xml);

The display in the browser is as follows:

<-- Title --> Some text

"Nicholas Paldino [.NET/C# MVP]" wrote:
musk,

Basically, your XML is not well-formed, so the browser has problem
displaying it. The browser, by default, applies a stylesheet to the XML
document to show it with the nice tree structure that you are accustomed
to.

Fix the errors in the XML returned, and it should work fine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
> All,
>
> I have a well form block of XML that is stored in a C# string type and
> I
> just simply want to display it in the browser using Response.Write but
> when I
> try this I get the following error:
>
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct the error
> and
> then click the Refresh button, or try again later.
>
>
> --------------------------------------------------------------------------------
>
> Cannot have a DOCTYPE declaration outside of a prolog. Error processing
> resource 'http://localhost/App1/WebForm1.asp...
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> ----------^
>
>


Nov 16 '05 #5

P: n/a
Hi,

I am still getting the same error:

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r\n");
xml.Append ("<!-- Title -->\r\n");
xml.Append ("<T1>\r\n");
xml.Append ("<Message>Some text</Message>\r\n");
xml.Append ("</T1>\r");

Response.ContentType="text/xml";
Response.Write (xml.ToString());
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
--------------------------------------------------------------------------------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/responsexml/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^

"Nicholas Paldino [.NET/C# MVP]" wrote:
msuk,

You also need to set the ContentType property on the response to
"text/xml".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,

I don't get the nice tree stucture for some reason what am I doing wrong.

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
xml.Append ("<-- Title -->\r");
xml.Append ("<T1>\r");
xml.Append ("<Mssage>Some text</Message>\r");
xml.Append ("</T1>\r");

Response.Write (xml);

The display in the browser is as follows:

<-- Title --> Some text

"Nicholas Paldino [.NET/C# MVP]" wrote:
musk,

Basically, your XML is not well-formed, so the browser has problem
displaying it. The browser, by default, applies a stylesheet to the XML
document to show it with the nice tree structure that you are accustomed
to.

Fix the errors in the XML returned, and it should work fine.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:9A**********************************@microsof t.com...
> All,
>
> I have a well form block of XML that is stored in a C# string type and
> I
> just simply want to display it in the browser using Response.Write but
> when I
> try this I get the following error:
>
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct the error
> and
> then click the Refresh button, or try again later.
>
>
> --------------------------------------------------------------------------------
>
> Cannot have a DOCTYPE declaration outside of a prolog. Error processing
> resource 'http://localhost/App1/WebForm1.asp...
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> ----------^
>
>


Nov 16 '05 #6

P: n/a
Try to clear the response output stream prior to
writing the XML stream.
Response.ClearContent();
Response.ContentType = "text/xml";
Response.Write(xml.ToString());

If that does not work. Hmm.
Take the XML that you write, place it in a text file and save with XML
extension.
Open in your browser just to see that it works as it should.
I know at least Internet Explorer and Mozilla Firefox both apply builtin
stylesheets to
standalone XML files, so i recommend that you use any of those.

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
Hi,

Sorry for the typo's but using the following I dont get the XML structure
but just the text "Message"

// Put user code to initialize the page here
StringBuilder xml = new StringBuilder();
xml.Append ("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r\n");
xml.Append ("<VirusChecker>\r\n");
xml.Append ("<Scan>Message</Scan>\r\n");
xml.Append ("</VirusChecker>\r\n");
Response.Write (xml.ToString());

How can I display the XML structure?
Thanks
Msuk

"Dennis Myrén" wrote:
And also;
<Mssage>Some text</Message>
should be
<Message>Some text</Message>

--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Dennis Myrén" <de****@oslokb.no> wrote in message
news:tz*******************@news2.e.nsc.no...
I think your comment should be
<!-- Title -->
rather than
<-- Title -->
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
> Hi,
>
> I don't get the nice tree stucture for some reason what am I doing

wrong.
>
> StringBuilder xml = new StringBuilder();
> xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
> xml.Append ("<-- Title -->\r");
> xml.Append ("<T1>\r");
> xml.Append ("<Mssage>Some text</Message>\r");
> xml.Append ("</T1>\r");
>
> Response.Write (xml);
>
> The display in the browser is as follows:
>
> <-- Title --> Some text
>
>
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
> > musk,
> >
> > Basically, your XML is not well-formed, so the browser has problem > > displaying it. The browser, by default, applies a stylesheet to
the
XML
> > document to show it with the nice tree structure that you are

accustomed
to.
> >
> > Fix the errors in the XML returned, and it should work fine.
> >
> > Hope this helps.
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mv*@spam.guard.caspershouse.com
> >
> > "msuk" <ms**@discussions.microsoft.com> wrote in message
> > news:9A**********************************@microsof t.com...
> > > All,
> > >
> > > I have a well form block of XML that is stored in a C# string
type and
I
> > > just simply want to display it in the browser using
Response.Write but
> > > when I
> > > try this I get the following error:
> > >
> > > The XML page cannot be displayed
> > > Cannot view XML input using XSL style sheet. Please correct the

error
and
> > > then click the Refresh button, or try again later.
> > >
> > >
> >

-------------------------------------------------------------------------- ------
> > >
> > > Cannot have a DOCTYPE declaration outside of a prolog. Error
processing
> > > resource 'http://localhost/App1/WebForm1.asp...
> > >
> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> > > ----------^
> > >
> > >
> >
> >
> >


Nov 16 '05 #7

P: n/a
Anyone help please?

Thanks
Msuk

"msuk" wrote:
Hi,

I am still getting the same error:

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r\n");
xml.Append ("<!-- Title -->\r\n");
xml.Append ("<T1>\r\n");
xml.Append ("<Message>Some text</Message>\r\n");
xml.Append ("</T1>\r");

Response.ContentType="text/xml";
Response.Write (xml.ToString());
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
--------------------------------------------------------------------------------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/responsexml/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^

"Nicholas Paldino [.NET/C# MVP]" wrote:
msuk,

You also need to set the ContentType property on the response to
"text/xml".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
Hi,

I don't get the nice tree stucture for some reason what am I doing wrong.

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
xml.Append ("<-- Title -->\r");
xml.Append ("<T1>\r");
xml.Append ("<Mssage>Some text</Message>\r");
xml.Append ("</T1>\r");

Response.Write (xml);

The display in the browser is as follows:

<-- Title --> Some text

"Nicholas Paldino [.NET/C# MVP]" wrote:

> musk,
>
> Basically, your XML is not well-formed, so the browser has problem
> displaying it. The browser, by default, applies a stylesheet to the XML
> document to show it with the nice tree structure that you are accustomed
> to.
>
> Fix the errors in the XML returned, and it should work fine.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mv*@spam.guard.caspershouse.com
>
> "msuk" <ms**@discussions.microsoft.com> wrote in message
> news:9A**********************************@microsof t.com...
> > All,
> >
> > I have a well form block of XML that is stored in a C# string type and
> > I
> > just simply want to display it in the browser using Response.Write but
> > when I
> > try this I get the following error:
> >
> > The XML page cannot be displayed
> > Cannot view XML input using XSL style sheet. Please correct the error
> > and
> > then click the Refresh button, or try again later.
> >
> >
> > --------------------------------------------------------------------------------
> >
> > Cannot have a DOCTYPE declaration outside of a prolog. Error processing
> > resource 'http://localhost/App1/WebForm1.asp...
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> > ----------^
> >
> >
>
>
>


Nov 16 '05 #8

P: n/a
> Anyone help please?
Well, I did;

Try to clear the response output stream prior to
writing the XML stream.
Response.ClearContent();
Response.ContentType = "text/xml";
Response.Write(xml.ToString());

If that does not work. Hmm.
Take the XML that you write, place it in a text file and save with XML
extension.
Open in your browser just to see that it works as it should.
I know at least Internet Explorer and Mozilla Firefox both apply builtin
stylesheets to
standalone XML files, so i recommend that you use any of those.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Anyone help please?

Thanks
Msuk

"msuk" wrote:
Hi,

I am still getting the same error:

StringBuilder xml = new StringBuilder();
xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r\n");
xml.Append ("<!-- Title -->\r\n");
xml.Append ("<T1>\r\n");
xml.Append ("<Message>Some text</Message>\r\n");
xml.Append ("</T1>\r");

Response.ContentType="text/xml";
Response.Write (xml.ToString());
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.


--------------------------------------------------------------------------

------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://localhost/responsexml/WebForm1.asp...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
----------^

"Nicholas Paldino [.NET/C# MVP]" wrote:
msuk,

You also need to set the ContentType property on the response to
"text/xml".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"msuk" <ms**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
> Hi,
>
> I don't get the nice tree stucture for some reason what am I doing wrong. >
> StringBuilder xml = new StringBuilder();
> xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
> xml.Append ("<-- Title -->\r");
> xml.Append ("<T1>\r");
> xml.Append ("<Mssage>Some text</Message>\r");
> xml.Append ("</T1>\r");
>
> Response.Write (xml);
>
> The display in the browser is as follows:
>
> <-- Title --> Some text
>
>
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> musk,
>>
>> Basically, your XML is not well-formed, so the browser has problem >> displaying it. The browser, by default, applies a stylesheet to the XML >> document to show it with the nice tree structure that you are accustomed >> to.
>>
>> Fix the errors in the XML returned, and it should work fine.
>>
>> Hope this helps.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - mv*@spam.guard.caspershouse.com
>>
>> "msuk" <ms**@discussions.microsoft.com> wrote in message
>> news:9A**********************************@microsof t.com...
>> > All,
>> >
>> > I have a well form block of XML that is stored in a C# string type and >> > I
>> > just simply want to display it in the browser using Response.Write but >> > when I
>> > try this I get the following error:
>> >
>> > The XML page cannot be displayed
>> > Cannot view XML input using XSL style sheet. Please correct the error >> > and
>> > then click the Refresh button, or try again later.
>> >
>> >
>>

--------------------------------------------------------------------------

------
>> >
>> > Cannot have a DOCTYPE declaration outside of a prolog. Error processing >> > resource 'http://localhost/App1/WebForm1.asp...
>> >
>> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
>> > ----------^
>> >
>> >
>>
>>
>>

Nov 16 '05 #9

P: n/a
Just mail me the material off the list and i will help you out.
dennis at oslokb dot no
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
Hi again,

My C# component returns the XML string that I write out to file and when I
open it in my brower it seems to be fine apart from a base64 encoded tag I
have see below

<file dt:dt="bin.base64">0M8R4KGxG....

that is truncated but if I open the file in notepad it is all there could
this be causing the problem? How can I display the complete file tag
containg in Internet explorer?

Thanks
Msuk

"Dennis Myrén" wrote:
Anyone help please?

Well, I did;

Try to clear the response output stream prior to
writing the XML stream.
Response.ClearContent();
Response.ContentType = "text/xml";
Response.Write(xml.ToString());

If that does not work. Hmm.
Take the XML that you write, place it in a text file and save with XML
extension.
Open in your browser just to see that it works as it should.
I know at least Internet Explorer and Mozilla Firefox both apply builtin
stylesheets to
standalone XML files, so i recommend that you use any of those.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"msuk" <ms**@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com...
Anyone help please?

Thanks
Msuk

"msuk" wrote:

> Hi,
>
> I am still getting the same error:
>
> StringBuilder xml = new StringBuilder();
> xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r\n");
> xml.Append ("<!-- Title -->\r\n");
> xml.Append ("<T1>\r\n");
> xml.Append ("<Message>Some text</Message>\r\n");
> xml.Append ("</T1>\r");
>
> Response.ContentType="text/xml";
> Response.Write (xml.ToString());
>
>
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct the error
and
> then click the Refresh button, or try again later.
>
>

--------------------------------------------------------------------------
------
>
> Cannot have a DOCTYPE declaration outside of a prolog. Error
processing > resource 'http://localhost/responsexml/WebForm1.asp...
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> ----------^
>
>
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
> > msuk,
> >
> > You also need to set the ContentType property on the response to > > "text/xml".
> >
> >
> > --
> > - Nicholas Paldino [.NET/C# MVP]
> > - mv*@spam.guard.caspershouse.com
> >
> > "msuk" <ms**@discussions.microsoft.com> wrote in message
> > news:41**********************************@microsof t.com...
> > > Hi,
> > >
> > > I don't get the nice tree stucture for some reason what am I doing
wrong.
> > >
> > > StringBuilder xml = new StringBuilder();
> > > xml.Append("<?xml version=" + "\"" + "1.0" + "\"" + "?>\r");
> > > xml.Append ("<-- Title -->\r");
> > > xml.Append ("<T1>\r");
> > > xml.Append ("<Mssage>Some text</Message>\r");
> > > xml.Append ("</T1>\r");
> > >
> > > Response.Write (xml);
> > >
> > > The display in the browser is as follows:
> > >
> > > <-- Title --> Some text
> > >
> > >
> > >
> > > "Nicholas Paldino [.NET/C# MVP]" wrote:
> > >
> > >> musk,
> > >>
> > >> Basically, your XML is not well-formed, so the browser has

problem
> > >> displaying it. The browser, by default, applies a stylesheet
to the XML
> > >> document to show it with the nice tree structure that you are

accustomed
> > >> to.
> > >>
> > >> Fix the errors in the XML returned, and it should work
fine. > > >>
> > >> Hope this helps.
> > >>
> > >>
> > >> --
> > >> - Nicholas Paldino [.NET/C# MVP]
> > >> - mv*@spam.guard.caspershouse.com
> > >>
> > >> "msuk" <ms**@discussions.microsoft.com> wrote in message
> > >> news:9A**********************************@microsof t.com...
> > >> > All,
> > >> >
> > >> > I have a well form block of XML that is stored in a C# string

type and
> > >> > I
> > >> > just simply want to display it in the browser using

Response.Write but
> > >> > when I
> > >> > try this I get the following error:
> > >> >
> > >> > The XML page cannot be displayed
> > >> > Cannot view XML input using XSL style sheet. Please correct

the error
> > >> > and
> > >> > then click the Refresh button, or try again later.
> > >> >
> > >> >
> > >>

--------------------------------------------------------------------------
------
> > >> >
> > >> > Cannot have a DOCTYPE declaration outside of a prolog. Error

processing
> > >> > resource 'http://localhost/App1/WebForm1.asp...
> > >> >
> > >> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"

> >> > ----------^
> > >> >
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >


Nov 16 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.