Problem with XML in Web Matrix - Please Help

I'm facing a problem with generating XML . i have used XmlTextWriter to generate an XML , then it is displayed using Response.Write().
What happens now is that following HTML tags get added at the end of the XML

As a result i get the following error :
"Only one top level element is allowed in an XML document. Error processing resource"

How do i remove this error..... Please help 

3/31/2007 9:24:37 AM 2237 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 12

I don't believe that you should be using Response.Write to output XML.  You should use the XmlTextWriter.Flush method instead.  Start with:

Response.ContentType = "text/xml";
XmlTextWriter objX = new XmlTextWriter(Response.OutputStream, Encoding.UTF8);

and then finish with:



Regards Mike
My site
3/31/2007 10:04:30 PM

Thanks man...

I tried your suggestion .... and it worked like magic.

Thanks again..

4/3/2007 4:30:40 AM

Similar Artilces:

Web Matrix and IIS. Page is not opening from Web Matrix. HELP!!!
Hi, I am running XP Pro with IIS + Web Matrix. I used all tips for fixing .NET in Web Matrix (XML config tips). When I am testing pages from Web Matrix http://localhost:8080/test.aspx nothing shows up in a browser. It is just white. However if I select Open in Web Browser from Web Matrix browser shows directory listing with all files. Once I click on one of those files again nothing happens. My configuration: Win XP SP1 with IIS running, Hardware router D-Link for sharing cable internet connection between 3 computers (port 8080 is open). Is it possible to get Web Matrix server to ...

Problem with Web Matrix Web Server, but not with IIS
I have installed Matrix on two machines, and get it worked just fine using IIS, however, the program generate the following error when I swithed the web server to Matrix Web Server, the system error is as follows: Need your help Server Error in '/' Application. -------------------------------------------------------------------------------- Error loading XML file c:\windows\\framework\v1.0.3705\Config\machine.config Request for the permission of type System.Security.Permissions.StrongNameIdentityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=...

VS.NET cannot detect Web Matrix web server
I'm running VS.NET 2003 on XP Home, so I have Web Matrix installed as a web server (I don't have IIS).I wanted to create my first web application with VS.NET, but when I select New Project -> web application I get the following message:VS.NET cannot detect a web server running 1.1... etc.I have the NET framework installed (SDK). Also I notice that I do not have a web server icon in my system tray. Do I have to do something to configure or enable Web Matrix web server (I only installed it).Many thanksChris Hey,VS.NET 2003 requires IIS; Web Matrix local web serve...

deploying web matrix web pages to host web server
Hi:I'm new to this forum and also in developing asp .net web pages.  I created web pages using Web Matrix v0.6.812.0 (connecting to an Access backend in the same folder as the web pages). Now I need to upload it to my company's web server (Windows 2000 with IIS and .Net Framework 1.1) so the customer can see them.  My administrator created a virtual site for me on the company's web server and I copied the .aspx, .ascx, .css, .mdb and web.config files to the directory for my virtual site.   When I try to access my default.aspx file on the web server thr...

help / web matrix or Visual
hello folks i have an web application build by web matrix. now this application will be able to use with pda/mda (pocket pc 2003). i try it in dreamweaver 2004 mx but i´m too "newbee". is it possible for a newbee with visual 2003? thanks for answers Ah. I believe matrix and DW (and VS as well) use different solution file formats. (Keeping lawyers off their backs?) So, you will have to create a solution in Visual Studio; and, if you want, drive the auto-wired code, in your aspx file, into your code behind files; such as aspx.vb or aspx.cs. Some...

Web hosting web matrix
Hello, I have a site made in web matrix with Access database . I want to put iti to work (it sells stuff). Is it legal and free to put it on a server and use it on this purpose? Ps: Do you recomend me to choose a web hosting company from my country ? Thanks!!! It's legal, and you should use a host that supports the functions you need.  That may or may not be in your country. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue. Don't depend on the location choose the host t...

possible to use both and web matrix for web application development?
Hello there, i am wondering will it possible to develop a web application using a mixture of web matrix and VS.NET? Say for example, on my application, i developing a web service module(both client n web service ) in VS.NET while my teammates is doing their web application module using webmatrix. Once integrated into a system will it work? Do note that these modules dont share the same data, hence no data exhange will occur. Both the application will be using VB.NET as well. Pls someone answer my doubts, thanks! If you do component programming ofcourse yes. it is like one ...

Web Matrix Web Server
Im having problems with using web matrix... Im using Microsoft Access as my database for my project... going over the tutorials, "ASP.NET Pages with Data (Microsoft Access) - Using the generated Data Methods", the example works fine when Im using the Web Matrix Server, however, there are errors when Im using IIS 6.0... is this because of the security settings? can anyone help me pinpoint which security setting is preventing this from working? tnx tnx tnx!!! Are you getting an error message when attempting to run this? Does your database live in the same virtual folder...

Missing Design Tab in using Web Matrix for XML Web Services
Did anyone come across the following situation? After selecting the XML Web Service template with VB.NET as the language, Sample as the class and MatrixDemo as the namespace, a code view was opened by Web Matrix. However, unlike the usually interface, I can't find any tabs underneath the code view. No design tab, no HTML tab and no ALL tab. Did I miss anything?...

web web web
Name: bahadir Email: Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Using web matrix web server with Visual Studio .NET 2003
Hello all, I am a computer system technology student and my college is a part of the MSDN Academic alliance, so I managed to recieve an educational copy of Visual Studio.NET 2003. Seeing as I am on a work term and actually have free time at night... I have decided to punish myself and learn another technology. My problem is that I am running it on a Windows XP Home edition system at home, so I cannot run IIS. I do have the professional CD, also from MSDN acdemic alliance, but, 1) I may someday use my XP Home to produce comercial solutions in HTML, PHP, JSP or other (though I'll pr...

after installing web matrix VB.NET web page don't work
I just started with ASP.NET in VB.NET. I had developed a simple web page and it worked fine. Then I installed web matrix and started playing with it. When I go back to VB and try to run the program (that worked before) I get an error: "Unable to start debugging on the web server. Could not start ASP.NET or ATL server debugging." How do I get VB.NET to working again? I'm not sure why your existing Web application don't work after the installation of Web Matrix, as they can live without conflict in fact, did you try to look for an answer from the about the ...

Problem with Web-Matrix Guided-tour Sending email with .net
Hi, I am new to, I followed the Web Matrix Project guided tour for the first few examples, they all ran well. When I start the creating a email form section, I ran into problem. 1. When I select the ASP.NET User Control template, the file extension would be ascx NOT ASPX. which one should I use? 2. When I use the ASCX file, the start button got disable. Not sure what ran wrong. 3. When I use the ASPX file, i got some directive error. Any advices would be appreciated!! Thanks Tim Hi Tim, It's most probably be a bug in the tutorial, while you may view post ...

hi, Web Matrix and .Net Framework ques... pls help
hi, im using Web Matrix v0.5 (build 464), and my .Net Framework is 1.0.3 ..... can i just dl .Net Framework 1.1 and Web Matrix v0.6, then install them all...? do i need to do anything for my previous WebMatrix or .Net Framework? thanks for reply... best regards life's Ng Hi Ng, Yes, what you have to do is just downloand & open :) WM 0.5 can coexist with WM 0.6, while you can view post 249010 if you want to target it to the .NET Fx v1.1 Regards, yeah thanks!!! i now got WM0.5 with .Net Framework v1.0 , WM0.6 with .Net Framework v1.1 both running in my com~~~ n...

Web Matrix Problem
Hi, 1- .Net FrameWork 2.0 Beta 2- ASP.NET Web Matrix install When I try open Web Matrix, Web Matrix Version page loading and pragram is not start. Why is not starting? Best Regards, HSYN Hi HSYN, These posts might help: view post 703056 and view post 249010 Colt...

Web resources about - Problem with XML in Web Matrix - Please Help -

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

Where will ISIS attack next? Christmas travel a problem for intelligence agencies
IT’S that time of year when we let our guards down, when we relax and look forward to spending time with our loved ones over the festive break. ...

Council mergers are an easy fix for a stupid Sydney problem
The plan to reform an array of tiny fiefdoms into more sensible councils is the best thing to happen to local government since the advent of ...

Dot-Sucks Domain Name Not Our Problem, Ottawa Says 2
The Canadian government has washed its hands of the "dot-sucks" controversy, as the new internet domain name begins to take root beside the more ...

Breitbart contributor says mass extinction via climate change isn’t a problem because of Jurassic Park ...
... about how science works. It did not go well for him: A Breitbart "journalist" claimed extinctions caused by climate change aren't a problem ...

Lawler: "Yes, Houston will have a problem next year"
Some thoughts on the Houston housing market from housing economist Tom Lawler: Earlier this week I sent out a message with a link to the Houston ...

Court secrecy is a dangerous problem
Recently unveiled documents in the Remington faulty-trigger case show court secrecy can lead to unnecessary deaths, says Arthur Bryant.

Yesterday’s technologies, today’s problems
When I first heard the story, I didn’t believe it. I mean, really, a Paris airport forced to shut down because a computer running Windows 3.1 ...

Michael Moore Reveals European Solutions To American Problems
... that we as Americans should also enjoy: free (University) education, child care, maternity leave, paid vacation, health care for all. Problems ...

The New York Times Has a Source Pollution Problem
A certain kind of source has burned the paper more than once this year. The New York Times has a serious source pollution problem. As is now ...

Resources last updated: 12/21/2015 5:28:10 PM