PDA

View Full Version : [SOLVED] Any XML Validators?



Dannik
November 13th, 2007, 03:51 AM
Hey guys, please suggest some nice XML Validators. I couldn't get XMLStarlet to work.

LaRoza
November 13th, 2007, 04:09 AM
http://www.getdeb.net/search.php?keywords=XML

Should be what you want.

stylishpants
November 13th, 2007, 08:06 AM
xmllint and xmlstarlet both work well for me. I use them for validating against both xml schema and RELAX NG.

Dannik
November 13th, 2007, 06:47 PM
Thank you for the link above. Well, I dont know why, but XMLStarlet just doesn't work. Whenever I type in "xml" in console, it says "bash: xml: command not found". Any ideas why?

meatpan
November 13th, 2007, 06:50 PM
Consider using firefox for a quick & dirty XML validation. There are also a few plug-ins that have some bells & whistles.

LaRoza
November 13th, 2007, 06:53 PM
Consider using firefox for a quick & dirty XML validation. There are also a few plug-ins that have some bells & whistles.

I know XML aware browser can check for well formed XML, but I don't if any can validate against an XML Schema or DTD, like the app I linked above.

Dannik
November 13th, 2007, 06:54 PM
How can I use firefox for validation? I thought all it does is show if document is well-formed. I need to validate it based on DTD.

LaRoza
November 13th, 2007, 06:58 PM
How can I use firefox for validation? I thought all it does is show if document is well-formed. I need to validate it based on DTD.

Locally, you can't as far as I know (as I stated). You can use the app I linked to, it works.

tbfr
November 13th, 2007, 07:30 PM
Thank you for the link above. Well, I dont know why, but XMLStarlet just doesn't work. Whenever I type in "xml" in console, it says "bash: xml: command not found". Any ideas why?

type in 'xmlstarlet' instead of 'xml', that should be the only difference from the websites documentation. it's a great tool.

Dannik
November 13th, 2007, 08:25 PM
Yes, Laroza the program does validate xml.
Tbfr, whenever I type "xmlstarlet" it tells me to use "xml". I still wonder why doesn't "xml" works. It seems like I'm the only one who has this problem.

tbfr
November 13th, 2007, 08:49 PM
Yes, Laroza the program does validate xml.
Tbfr, whenever I type "xmlstarlet" it tells me to use "xml". I still wonder why doesn't "xml" works. It seems like I'm the only one who has this problem.

don't worry, just use xmlstarlet :) if you call xmlstarlet without parameters it shows a help page, unfortunately with the wrong command name.

there are two debian bug reports about this:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398267
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=373167

Dannik
November 13th, 2007, 10:14 PM
lol, wow thank you so much. I did use "xmlstarlet" instead of "xml" and it worked! Strange, I was so sure that I tried it before and it didn't work.