eddie Posted September 10, 2009 Posted September 10, 2009 Hello, I have wrote a PHP script that writes a sitemap so that it can be dynamically updated when a user changes the website layout. Below is the xml structure that i cannot see any problems with but i cannot get it validated. The error that comes up is: Content of element type "root" must match "(url)". Here is the xml code, ]> http://whatever.co.uk/ http://whatever.co.uk/about/ http://whatever.co.uk/contact/ http://whatever.co.uk/services/ http://whatever.co.uk/ http://whatever.co.uk/ http://whatever.co.uk/test3/ http://whatever.co.uk/ http://whatever.co.uk/my-name/ http://whatever.co.uk/test5/ Can anyone help me here? Thanks a lot everyone. Eddie
MattMitchell Posted September 10, 2009 Posted September 10, 2009 Not messed around with dtd's but I'll bet that removing the (URL) bit will fix it... Other things to try: - put the dtd somewhere separately and reference it by urn - miss out the dtd altogether - your XML looks well-formed and you don't need it
PiqueABoo Posted September 10, 2009 Posted September 10, 2009 Lot's of XML but I'm not a DTD person either, however I think(!) that says "root" is an element within "root" which it isn't. If I couldn't find a way to avoid it altogether I'd try this instead: ]> 1
eddie Posted September 11, 2009 Author Posted September 11, 2009 Thanks very much guys!! Just for anyone that reads this and has this problem, I removed the and that fixed it. Like you said, it was trying to find a 'root' element within the 'root' tags. Thanks again chaps
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now