Welcome to WebmasterWorld Guest from 54.158.143.40

Forum Moderators: httpwebwitch

Message Too Old, No Replies

element error

   
4:00 pm on Jan 27, 2007 (gmt 0)

5+ Year Member



Is this some schema problem?
I don't have an XSD file and am just creating this XML file directly from PHP.

The begionning of the XML file is:
<?xml version='1.0'?><channel><title>blah blah

...

The error I get with a validator is:
1Column:33
Error:Can not find declaration of element 'channel'.

Any ideas?

8:35 pm on Jan 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you testing for well-formedness (document is marked up with correct XML syntax) or validity (i.e. the document conforms to a schema)? If the latter you need a DOCTYPE or schema declaration. Without more information about what you're trying to accomplish, however, it's hard to diagnose the problem.
8:44 pm on Jan 29, 2007 (gmt 0)

5+ Year Member



it was well formed-ness but I think I found the problem.
I had some ampersands in the xml text, which I replaced with &amp;

Do all reserved characters have to be like that?

10:26 pm on Jan 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do all reserved characters have to be like that?
Yes.