Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > XML Validation

Reply
Thread Tools

XML Validation

 
 
Michel Casabianca
Guest
Posts: n/a
 
      01-17-2008
Hello,

I need to validate XML documents in Ruby. I was told that REXML can't
perform validation, thus I tried using libxml.

SaxParser can't validate against a given DTD, so I tried DOM Parser.
But I can't find a way to get DOCTYPE from Document resulting from
parsing. I could find DTD file with a regexp against document source,
but it seems quite unefficient to me.

Is there a way to properly validate against a DTD using libxml-ruby or
is there a gem providing such a feature ?

NOTE: please don't try to convince me that I don"t need validation!
--
Michel Casabianca
http://www.velocityreviews.com/forums/(E-Mail Removed)



 
Reply With Quote
 
 
 
 
Joel VanderWerf
Guest
Posts: n/a
 
      01-17-2008
Michel Casabianca wrote:
> NOTE: please don't try to convince me that I don"t need validation!


I wouldn't think of it. XML, now, that's something you don't need.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

 
Reply With Quote
 
 
 
 
Michel Casabianca
Guest
Posts: n/a
 
      01-17-2008

Le 17 janv. 08 =E0 23:24, Joel VanderWerf a =E9crit :

> Michel Casabianca wrote:
>> NOTE: please don't try to convince me that I don"t need validation!

>
> I wouldn't think of it. XML, now, that's something you don't need.


Well done ;o)

Now, do you know a replacement for structured document format? YAML is =20=

great, but I can't figure how to use it for that purpose... RDoc is =20
great for README files, but it ends with hugly HTML tags for more =20
complex documents. SGML is great also, but writing a DTD is far too =20
complex. LaTeX is great too, but I can't parse it. That's why I'm =20
stuck with XML and need validation.

--
Michel Casabianca
(E-Mail Removed)



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add validation rule for url in the validation-rule.xml ,I added some thing like this but......... shailajabtech@gmail.com Java 0 10-12-2006 08:36 AM
Different results parsing a XML file with XML::Simple (XML::Sax vs. XML::Parser) Erik Wasser Perl Misc 5 03-05-2006 10:09 PM
Struts Validation Framework: suppressing startup output from validation.xml javadude Java 0 02-16-2005 05:37 PM
XML schema validation of one xml block based on values from another xml block Andy XML 0 11-18-2004 11:04 PM
Complex validation of business rules possible with XML Schema? Any other validation "languages"? Mike XML 1 11-21-2003 07:27 PM



Advertisments