473,545 Members | 1,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent! What is wrong with this XML file

K R
Hi,

I have generated this XML from my application. But, when I open this
XML, it is throwing error. Please help me to resolve this.

<?xml version="1.0" encoding="utf-8" ?>
<searchResult s>
<totalhits>1691 6</totalhits>
<searchquery> *</searchquery>
<timetaken>TI ME TAKEN</timetaken>
<resultsperpage >10</resultsperpage>
<currentpage>CU RRENT PAGE</currentpage>
<totalpages>169 2</totalpages>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&CollapseVi ew</reference>
<rank>1</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&ExpandView </reference>
<rank>2</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...C95D08D748256D
BE001F6848/</reference>
<rank>3</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Free Parking on Sundays and Public Holidays</title>
<reference>http://www7.hdb.gov.sg/isoa029p.nsf/...ew/2586B730068
056DC48256F4200 126775</reference>
<rank>4</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Free Parking on Sundays and Public Holidays. Free Parking on
Sundays and Public Holidays Free Parking on Sundays and Public Holidays
The Free Parking Scheme on Sundays and Public Holidays will be
implemented at the following coupon parking multi-storey car park with
effect from 7 November 2004 </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse View</reference>
<rank>5</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&ExpandVi ew</reference>
<rank>6</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/8191c55686c0407 a48256f37000491 80?OpenDocument </reference>
<rank>7</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &amp;
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse =1</reference>
<rank>8</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/70b762f7dfbedbe c48256f4000095d c7?OpenDocument </reference>
<rank>9</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &amp;
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Expand=1 </reference>
<rank>10</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
</searchResults>

Regards.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
3 1531
It's not valid XML, that's what's wrong with it. & denotes an entity and XML
knows only three entities on its own: &quot; &lt; and &gt;. But your "XML"
contains entities such as &CollapseVie w or &ExpandView (and it's missing the
; to end those). If those were supposed to be ampersands you need to encode
them.

Jerry

"K R" <kr*********@gm ail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hi,

I have generated this XML from my application. But, when I open this
XML, it is throwing error. Please help me to resolve this.

<?xml version="1.0" encoding="utf-8" ?>
<searchResult s>
<totalhits>1691 6</totalhits>
<searchquery> *</searchquery>
<timetaken>TI ME TAKEN</timetaken>
<resultsperpage >10</resultsperpage>
<currentpage>CU RRENT PAGE</currentpage>
<totalpages>169 2</totalpages>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&CollapseVi ew</reference>
<rank>1</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&ExpandView </reference>
<rank>2</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...C95D08D748256D
BE001F6848/</reference>
<rank>3</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Free Parking on Sundays and Public Holidays</title>
<reference>http://www7.hdb.gov.sg/isoa029p.nsf/...ew/2586B730068
056DC48256F4200 126775</reference>
<rank>4</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Free Parking on Sundays and Public Holidays. Free Parking on
Sundays and Public Holidays Free Parking on Sundays and Public Holidays
The Free Parking Scheme on Sundays and Public Holidays will be
implemented at the following coupon parking multi-storey car park with
effect from 7 November 2004 </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse View</reference>
<rank>5</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&ExpandVi ew</reference>
<rank>6</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/8191c55686c0407 a48256f37000491 80?OpenDocument </reference>
<rank>7</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &amp;
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse =1</reference>
<rank>8</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/70b762f7dfbedbe c48256f4000095d c7?OpenDocument </reference>
<rank>9</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &amp;
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Expand=1 </reference>
<rank>10</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
</searchResults>

Regards.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2
Hi KR

You have URLs in your document containing Query Strings, where name value
pairs are encoded as name=value&name =value...

As Jerry says, you need to escape ampersand characters as &amp;

Nigel

"K R" wrote:
Hi,

I have generated this XML from my application. But, when I open this
XML, it is throwing error. Please help me to resolve this.

<?xml version="1.0" encoding="utf-8" ?>
<searchResult s>
<totalhits>1691 6</totalhits>
<searchquery> *</searchquery>
<timetaken>TI ME TAKEN</timetaken>
<resultsperpage >10</resultsperpage>
<currentpage>CU RRENT PAGE</currentpage>
<totalpages>169 2</totalpages>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&CollapseVi ew</reference>
<rank>1</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&ExpandView </reference>
<rank>2</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...C95D08D748256D
BE001F6848/</reference>
<rank>3</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Free Parking on Sundays and Public Holidays</title>
<reference>http://www7.hdb.gov.sg/isoa029p.nsf/...ew/2586B730068
056DC48256F4200 126775</reference>
<rank>4</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Free Parking on Sundays and Public Holidays. Free Parking on
Sundays and Public Holidays Free Parking on Sundays and Public Holidays
The Free Parking Scheme on Sundays and Public Holidays will be
implemented at the following coupon parking multi-storey car park with
effect from 7 November 2004 </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse View</reference>
<rank>5</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&ExpandVi ew</reference>
<rank>6</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/8191c55686c0407 a48256f37000491 80?OpenDocument </reference>
<rank>7</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Collapse =1</reference>
<rank>8</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
<content>
<title>Press Releases Notice: Click for an overview of the
M...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848/70b762f7dfbedbe c48256f4000095d c7?OpenDocument </reference>
<rank>9</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Pres s Releases Notice: Click for an overview of the M....
Press Releases Notice: Click for an overview of the Marriage and
Parenthood Schemes . More under , and . | | | | | Housing &
Development Board Best Viewed with IE 5.0 and above, 800 x 600
resolution HDB HUB, 480 Lorong 6 Toa Payoh, </summary>
</content>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/...c95d08d748256d
be001f6848?Open View&Start=1&Co unt=30&Expand=1 </reference>
<rank>10</rank>
<weight>96.00 </weight>
<date>04 Nov 2004</date>
<summary>Web Title.... Web Title . </summary>
</content>
</searchResults>

Regards.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #3
K R wrote:
I have generated this XML from my application.
Never generate XML by hands. Always use XML API such as XmlTextWriter.
But, when I open this
XML, it is throwing error. Please help me to resolve this.


& must be esacaped as &amp; in XML.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1699
by: Heros | last post by:
I had losed my serial key for .net Visual Studio Professional, DVD ROM with the trial version, 60 days, and need urgent to use it to install .net Visual Basic. Please, its urgent. Thanks.
5
1801
by: VbUser25 | last post by:
hi i need urgent responses.. i have some 15 checkboxex on a form... i want to 1st check the no. of checkboxes that are checked?? and then loop it that many times adn insert the quantities the user enters in the text boxes. do i need to group the checkboxes....hwo can i do that??? how to know which checkbox is checked because out of the...
9
4288
by: Stefan Bauer | last post by:
Hi NG, we've got a very urgent problem... :( We are importing data with the LOAD utility. The input DATE field data is in the format DDMMYYYY (for days) and MMYYYY (for months). The target data format is european DD.MM.YYYY (for days) and 01.MM.YYYY (for months). The input format is not recognizable as a DATE input to a DB2 LOAD for
28
3005
by: Tamir Khason | last post by:
Follwing the struct: public struct TpSomeMsgRep { public uint SomeId;
4
1836
by: EricJ | last post by:
the click event of a picturebox gives an e As System.EventArgs but this e dousnt contain xy coordinates of the click (and yes i need those :/) Private Sub picSchade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picSchade.Click getting desperate here (they have to present it tomorrow morning)
7
13618
by: deepagulati | last post by:
Hi, I need an urgent help from you. When we dynamically genrate any list box (Select Box) it shows one default value as selected. Is there any way that we can deselect that value. I tried with document.form_Name.ListBox_Name.options.selected =
3
6435
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. ...
0
1743
by: prannoy | last post by:
Please help me.. It is urgent. I developed the interface of my project on mathematics using a 256 colour driver (bgi256v2.bgi) which i got from the internet. But when i finished designing the interface and tried to use mouse, i found the driver did not support mouse. i tried a few of the drivers but no result. So i need urgent help from...
1
2103
by: rajesh.us.it.recruiter | last post by:
Hi Guys/Partners, We have a URGENT Requirement for Perl Programmer with H1 visa in India/US for one of our prestigious Client. Location : New Jersey Requirements : Should be very strong in Perl Should be strong in SQL, Unix, C++ Should have some knowledge in RDBMS
7
5948
by: Cirene | last post by:
I used to use the Web Deployment Project with my VS2005 projects. Now I've fully upgraded to VS2008. Do I have to download a new version of the Web Deployment Project? If so where can I find it? If not, how do I have to change my deployment strategy? Thanks!
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.