L
linhardt
I am wondering how to make ASP.NET output XML instead of HTML.
Here is my situation:
I am using IE as a front-end to browse company documents. Let's say,
a user wants a Word document called foobar, then they'd do a http
request for "getdoc.aspx?foobar"
Now what getdoc.aspx does is it gets the Word document from the server
file system, does an XSLT transform on it to hyperlink it to other
documents and then returns the hyperlinked WordML document to the
browser.
What I want is for the IE to display the transformed Word document in
the browser's Word Add-In.
My problem is that ASP.NET seems to want to return HTML, not XML/
WordML.
Using an XmlWriter I am able to stream the WordML markup to the
browser, but I get a DOCTYPE and HTML code appended to the end, so the
Word Add-In won't touch it.
I tried deleting the DOCTYPE and HTML markup from the page design
source in Visual Studio, but then VS complains "Validation (): Element
'html' occurs too few times".
I know I can transform the WordML into HTML using WordML2HTML.xslt,
but this is both slow and not as pretty as loading a WordML into the
browser Add-In. (I want the client to deal with processing the WordML
tags.)
I know I could return XML via a WebService, but I don't want to deal
with the WSDL. All I want is for IIS to return the raw XML/WordML so
that the browser can load it.
Is there some special settings or DOCTYPE I need to set in Visual
Studio to get ASP to return XML or is a Web Form the wrong tool for
what I'm trying to do?
thanks
paul
Here is my situation:
I am using IE as a front-end to browse company documents. Let's say,
a user wants a Word document called foobar, then they'd do a http
request for "getdoc.aspx?foobar"
Now what getdoc.aspx does is it gets the Word document from the server
file system, does an XSLT transform on it to hyperlink it to other
documents and then returns the hyperlinked WordML document to the
browser.
What I want is for the IE to display the transformed Word document in
the browser's Word Add-In.
My problem is that ASP.NET seems to want to return HTML, not XML/
WordML.
Using an XmlWriter I am able to stream the WordML markup to the
browser, but I get a DOCTYPE and HTML code appended to the end, so the
Word Add-In won't touch it.
I tried deleting the DOCTYPE and HTML markup from the page design
source in Visual Studio, but then VS complains "Validation (): Element
'html' occurs too few times".
I know I can transform the WordML into HTML using WordML2HTML.xslt,
but this is both slow and not as pretty as loading a WordML into the
browser Add-In. (I want the client to deal with processing the WordML
tags.)
I know I could return XML via a WebService, but I don't want to deal
with the WSDL. All I want is for IIS to return the raw XML/WordML so
that the browser can load it.
Is there some special settings or DOCTYPE I need to set in Visual
Studio to get ASP to return XML or is a Web Form the wrong tool for
what I'm trying to do?
thanks
paul