Groups | Blog | Home
all groups > dotnet xml > july 2004 >

dotnet xml : MSXML3.0 in ASP.Net


ram
7/9/2004 3:45:02 PM
Hi

i AM USING VISUAL STUDIO.NET FOR MY ASP.NET PROGRAMS. I would like to access xml files using MSXML3.0 parser. Can any body tell me the syntax of "Import" statement to call this control in my program? Possible please give me MSXML3.0 reference URLs.

Thx
Chris Lovett
7/9/2004 11:40:55 PM
Usually a .NET program uses the System.Xml assembly to process XML.

Import System.Xml
Dim doc as new XmlDocument
doc.Load(Server.MapPath(filename))

and you're on your way.


[quoted text, click to view]
access xml files using MSXML3.0 parser. Can any body tell me the syntax of
"Import" statement to call this control in my program? Possible please give
me MSXML3.0 reference URLs.
[quoted text, click to view]

Ram
7/10/2004 11:01:02 AM
dear chris

thx for the help. but still i have errors with displaying the xml document in asp.net. the following error is appearing when I am trying to display xml content.

"Required white space was missing. Error processing resource 'http://localhost/WebApplication1/WebForm1.aspx'. Line 2, Posi...

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




[quoted text, click to view]
Ram
7/10/2004 8:26:02 PM
Dear Bjoern

Thx for the code. But it worked for only one time. And from next time same error isappearing.


Required white space was missing. Error processing resource 'http://localhost/WebApplication1/WebForm1.aspx'. Line 2, Posi...

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

Rgds
Ram


[quoted text, click to view]
Bjoern Hoehrmann
7/11/2004 3:44:49 AM
* Ram wrote in microsoft.public.dotnet.xml:
[quoted text, click to view]

That's not an XML document then. For XML documents, a so-called system
identifier would be required, e.g.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

So, after the second " in your document the processor expects a
whitespace followed by a quote mark, which it does not find and
thus aborts processing the document. It seems that you are trying
to process a HTML document, you cannot do that using an XML processor.
Try converting the document to XHTML e.g. using HTML Tidy which you
will find at <http://www.w3.org/People/Raggett/tidy/>. I am also told
that the SgmlReader package you can find on GotDotNet.com provides
Oleg Tkachenko [MVP]
7/11/2004 11:07:47 AM
[quoted text, click to view]

You better provide more information - minimal sample of an XML document,
your code, full error info as well as an explanation what are you trying
to achieve.

--
Oleg Tkachenko [XML MVP]
AddThis Social Bookmark Button