Solved

SABLOTRON Error when parsing XML with XSL - 500pts

Posted on 2006-07-13
13
639 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 17100263
What version of PHP are you using and what OS?
0
 
LVL 29

Accepted Solution

by:
TeRReF earned 500 total points
ID: 17100713
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
ID: 17101787
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 7

Expert Comment

by:JB04
ID: 17103889
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:Richard Quadling
ID: 17106600
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
ID: 17106612
Exactly, that's why I think it's 'the bug' decribed in my earlier entry...
0
 
LVL 1

Author Comment

by:Liam2k3
ID: 17107271
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
ID: 17107557
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
ID: 17109023
Apparently my server runs PHP version 4.4.1
0
 
LVL 1

Author Comment

by:Liam2k3
ID: 17137268
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:Richard Quadling
ID: 17137337
What extenstion are you using for the XML?
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 17137338
What PHP extenstion are you using for the XML?
0
 
LVL 1

Author Comment

by:Liam2k3
ID: 17137348
I've managed to get that first sollution to work.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

622 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