Urgent! whats wrong with this XML file??

K R (archive)

Usenet Archive
Joined
Aug 18, 2004
Messages
7
Reaction score
0
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" ?>
<searchResults>
<totalhits>16916</totalhits>
<searchquery>*</searchquery>
<timetaken>TIME TAKEN</timetaken>
<resultsperpage>10</resultsperpage>
<currentpage>CURRENT PAGE</currentpage>
<totalpages>1692</totalpages>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/3a9b4621c95d08d748256d be001f6848?OpenView&CollapseView</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/3a9b4621c95d08d748256d be001f6848?OpenView&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/3A9B4621C95D08D748256D 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/searchview/2586B730068 056DC48256F4200126775</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/3a9b4621c95d08d748256d be001f6848?OpenView&Start=1&Count=30&CollapseView</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/3a9b4621c95d08d748256d be001f6848?OpenView&Start=1&Count=30&ExpandView</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/3a9b4621c95d08d748256d be001f6848/8191c55686c0407a48256f3700049180?OpenDocument</reference> <rank>7</rank> <weight>96.00</weight> <date>04 Nov 2004</date> <summary>Press 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/3a9b4621c95d08d748256d be001f6848?OpenView&Start=1&Count=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/3a9b4621c95d08d748256d be001f6848/70b762f7dfbedbec48256f4000095dc7?OpenDocument</reference> <rank>9</rank> <weight>96.00</weight> <date>04 Nov 2004</date> <summary>Press 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/3a9b4621c95d08d748256d be001f6848?OpenView&Start=1&Count=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.
 
Joined
Aug 27, 2004
Messages
155
Reaction score
0
K said:
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" ?>
<searchResults>
<totalhits>16916</totalhits>
<searchquery>*</searchquery>
<timetaken>TIME TAKEN</timetaken>
<resultsperpage>10</resultsperpage>
<currentpage>CURRENT PAGE</currentpage>
<totalpages>1692</totalpages>
<content>
<title>Web Title...</title>
<reference>http://www7.hdb.gov.sg/isoa032p.nsf/3a9b4621c95d08d748256d be001f6848?OpenView&CollapseView</reference>

This is wrong ^^^
It is the ampersand, which is a special symbol in XML
Use xmllint like this to find out:

xmllint -noout filename.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
548,208
Messages
3,104,798
Members
249,594
Latest member
henrywalsh

Latest Threads

Top