LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-27-2004, 05:13 AM   #1
jimieee
Member
 
Registered: Aug 2003
Location: London, UK
Distribution: Debian and Fedora for play and RHEL + Solaris for work
Posts: 172

Rep: Reputation: 15
PHP - XML error: junk after document element at line...


Hi,

I'm trying to use Expat to read XML from a remote source (over http), but I get this error:

XML error: junk after document element at line 460

The thing is line 460 doesn't exist! My XML source stops at line 457 (I used wc to check the actual file). I know that this error can be caused by the structure of the XML, but when I simplified it I still got the same error, here's the basic kind of layout:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="custom">
  <channel>
    <website_id></website_id>
    <title></title>
    <link></link>
    <description></description>
    <language></language>
    <item>
        <date></date>
        <object_id></object_id>
        <version_no></version_no>
        <title></title>
        <summary>
        </summary>
        <body>
        </body>
    </item>
  </channel>
</rss>
(The item field is repeated lots of times and I used the term "rss" to ease integration into my CMS, even though it isn't).

Can anyone lend some friendly advice?

Thanks,

James
 
Old 04-27-2004, 11:03 AM   #2
jimieee
Member
 
Registered: Aug 2003
Location: London, UK
Distribution: Debian and Fedora for play and RHEL + Solaris for work
Posts: 172

Original Poster
Rep: Reputation: 15
The thing is I can get the results, but the error still comes up. The code I'm using is an example from http://uk.php.net/xml - Example 2. Map XML to HTML.
 
Old 04-27-2004, 11:16 AM   #3
jimieee
Member
 
Registered: Aug 2003
Location: London, UK
Distribution: Debian and Fedora for play and RHEL + Solaris for work
Posts: 172

Original Poster
Rep: Reputation: 15
Hmmm nevermind, I'm getting the hang of it

Last edited by jimieee; 04-27-2004 at 11:19 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for XML::Parser... configure: error: XML::Parser perl module is required for kornerr Linux - General 11 11-16-2008 07:24 AM
XML question multiple parents for child element pld Programming 1 03-17-2005 02:14 PM
Fatal Error - Call to undefined function : pg_pconnect() in filename.php on line xx mwpeng Linux - Newbie 1 02-26-2005 08:57 AM
gnome: launch application associated to a document type from command line cweiske Linux - Software 1 09-28-2004 06:47 PM
Reading a xml document: amirspl Programming 3 09-10-2003 07:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration