-1

Never really worked with XML before, but how come this isn't validating:

http://test.ipalaces.org/palnfo/template.xml


With w3schools i get Error: Object # has no method 'load'

3
  • This parsed fine for me using IE. This could be an issue with the w3schools site. What technology / language are you using to parse this in your application? .NET, Web, Java, python, etc? Commented Feb 17, 2011 at 19:42
  • With w3schools? Seriously? You should read this Commented Feb 17, 2011 at 19:42
  • Link is Dead! Question is not useful anymore. Commented Feb 4, 2016 at 13:09

4 Answers 4

3

You're using Chrome, aren't you? Your XML is fine; the w3schools validator is not.

Consider using a different online validator, or installing one locally. You may even find you've got a basic one installed somewhere already, depending on your OS (xmllint came pre-installed on my Mac, for example.)

Incidentally, you're also probably not actually "validating", technically, rather checking for "well-formedness". To validate you'd need a DTD or XSD.

Sign up to request clarification or add additional context in comments.

Comments

2

What you got here is a Javascript error.

From the w3schools validator :

<script language="JavaScript" type="text/javascript">
document.write("<h2>Result of Validating: http://test.ipalaces.org/palnfo/template.xml</h2>");
// code for IE
if (window.ActiveXObject)
{
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.validateOnParse="true";
xmlDoc.load("http://test.ipalaces.org/palnfo/template.xml"); // <--- ERROR HERE 

2 solutions :

  • Stop using IE (whatever version you're using) or any other uncompatible (with this validator) web browser you're using.
  • Stop using w3schools validator which sucks. (use the w3c one which is the more official or this one)

EDIT :

I'll add that, in general, please, avoid w3schools and go to official manual or website.

First because http://w3fools.com and then because there's better! For everything about HTML, XHTML, XML, search for it and "w3c" in google. For Javascript, use "MDC"+whatever-you're-looking-for, for php, go to their manual

Comments

0

Seems ok to me. When I ran it against the w3schools validator I got this message:

Result of Validating: http://test.ipalaces.org/palnfo/template.xml

Doesn't really tell you anything but no obvious error message. How are you validating it?

Also, this might be a shot in the dark but are you sure this isn't a jQuery error? I did a quick search of your error message and found two SO posts that had very similar error messages:

Comments

0

I think it's an error on their javascript.

It seems to be fixed. It validated with me. Can you try again ?

You used this URL http://www.w3schools.com/site/site_validate.asp right ? Fourth section Right ?

It also depends on the browser you use to access the validation page because as you might know different browser load XML files in different ways. What browser did you use ?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.