DataSet.ReadXML() and xml:stylesheet

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kai Thorsrud (replyToThreadInstead_at_devnull.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 15:17:58 +0100

Hi!

I've developed an application that uses XML as its datastorage. The
resulting XML file are to be used in a webpage with a XSL Stylesheet.
However if i add a <?xml:stylesheet type="text/xsl" href="style.xsl"?> tag
in my XML document the ReadXML method throws an exception like this:

System.Xml.XmlException: 'xml:stylesheet' is an invalid name for processing
instructions. Line 2, position 3.
   at System.Xml.XmlTextReader.ParseTag()
   at System.Xml.XmlTextReader.ParseRoot()
   at System.Xml.XmlTextReader.Read()
   at System.Xml.XmlReader.MoveToContent()
   at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
   at System.Data.DataSet.ReadXml(String fileName)

Is there a way to allow this tag in my XML document when using ReadXML ?

The problem is that i cannot afford having an application rendering a HTML
document whenever the XML file changes since there will be a lot of writes
to the XML file.
Also I really want to avoid installing a web server on this machine (due to
the physical networked location of the machine) so I cannot create an ASP
file that renders the html file whenever someone wants to look at the
document.

As a last resort i tried using Xinclude wich MSXML unfortunately does not
implement afaik.

Help would be greatly appreciated.

Best Regards
Kai Thorsrud



Relevant Pages

  • Re: Understanding application security in .NET
    ... > users and pass into a database or into an XML document ... > and then parse it. ... > to treat permissions on abstract ressource. ... > to extend your XML file. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Understanding application security in .NET
    ... It's really depending if you need to store your ... users and pass into a database or into an XML document ... and then parse it. ... to extend your XML file. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • BIS/ICE & XML
    ... the other a .xml file (which I think is the resulting XML document). ... Kathy. ... Prev by Date: ...
    (comp.sys.unisys)
  • Re: XML challenge!
    ... But if I do this how can I get more than one xml file into the dataset? ... > filter to the data table. ... >> results in a DataGrid control (or GridView, DetailsView, or FormView ... >> to either a custom business object or xml document, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Using HTML To Download File
    ... it still looks like the xml file needs to be local to the server ... the html file may not load a file ... I only need it to fetch when I ... I tried wget to fetch the file but only by using a XP command ...
    (microsoft.public.frontpage.programming)