Solved

SABLOTRON Error when parsing XML with XSL - 500pts

Posted on 2006-07-13
13
626 Views
Last Modified: 2013-11-19
Hey,
What is the source of this error and how can I fix it?
"Warning: Sablotron error on line 1: XML parser error 4: not well-formed (invalid token) in home.php on line 30"

        <?php
            $xh = xslt_create();
            $myResult = xslt_process($xh, 'http://yookkoo.com/Forum/rss.php?f=1', 'http://www.yookkoo.com/Website/TransNews.xsl');
            echo $myResult
            xslt_free($xh);
        ?>

$myResult = ... is line 30

Liam
0
Comment
Question by:Liam2k3
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
What version of PHP are you using and what OS?
0
 
LVL 29

Accepted Solution

by:
TeRReF earned 500 total points
Comment Utility
I've found this interesting  discussion about your problem.
There is a possible solution at the bottom of the document...
http://bugs.php.net/bug.php?id=16193
0
 
LVL 1

Author Comment

by:Liam2k3
Comment Utility
The solution you gave did not work.  It only left me with a blank space where the transformed document would go, without any errors.  I'm running PHP 4.x (I believe it could be 4.1, I'll find out later) and Linux.
0
 
LVL 7

Expert Comment

by:JB04
Comment Utility
The error means your document has incorrect syntax, you should look for invalid tags or extra white space on the end/beginning of the document
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
Both of those XML files reported as valid by Tidy and look OK when downloaded and viewed as source.

0
 
LVL 29

Expert Comment

by:TeRReF
Comment Utility
Exactly, that's why I think it's 'the bug' decribed in my earlier entry...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:Liam2k3
Comment Utility
Could it be that there is no Schema for the XML document?  If not Is there another way to achieve what I would like to do?

Liam
0
 
LVL 29

Expert Comment

by:TeRReF
Comment Utility
Answer to you first question:
No.

Your second question:
Good change your error will disappear when you upgrade PHP to a newer version (say the latest 4.x version).
 
0
 
LVL 1

Author Comment

by:Liam2k3
Comment Utility
Apparently my server runs PHP version 4.4.1
0
 
LVL 1

Author Comment

by:Liam2k3
Comment Utility
If my servers running 4.4.1 this should be sufficiently new enough not to cause that problem.  So what else can I try?
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
What extenstion are you using for the XML?
0
 
LVL 40

Expert Comment

by:RQuadling
Comment Utility
What PHP extenstion are you using for the XML?
0
 
LVL 1

Author Comment

by:Liam2k3
Comment Utility
I've managed to get that first sollution to work.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now