?
Solved

Load XML Unexpected End Of File

Posted on 2008-11-06
2
Medium Priority
?
1,576 Views
Last Modified: 2012-06-27
Part of my application retrieves query string via a http post. eg, http://a.c.com/app/test.aspx?
qs=<Re><ID>#01</ID><Item>00</Item></Re>

qs =Request.QueryString("str")
........

xmlDoc.LoadXml(qs)
qs is in valid xml form, however i encountered the following error due to the '#' sign which is not a reserved symbol in xml. The process will be ok if i remove the # sign. Pls advise.

Unexpected end of file has occurred. The following elements are not closed: ID..
0
Comment
Question by:shiaoyan05
2 Comments
 
LVL 4

Accepted Solution

by:
BToson earned 2000 total points
ID: 22898484
This is occurring due a value in a url followed by a # indicates a link to an anchor on the page.
If you examine your actual query string received by ASP.NET, you will notice that anything after and including the hash character will not be sent by the browser.
0
 

Author Closing Comment

by:shiaoyan05
ID: 31514021
Thanks for the tip!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question