# Validation of XML with XmlSimple

**URL:** <https://www.ruby-forum.com/t/validation-of-xml-with-xmlsimple/207214>\
**Category:** Rails\
**Created:** [May 20, 2011, 5:29pm UTC](https://www.ruby-forum.com/t/validation-of-xml-with-xmlsimple/207214 "2011-05-20T17:29:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [May 20, 2011, 5:29pm UTC](https://www.ruby-forum.com/t/validation-of-xml-with-xmlsimple/207214/1 "2011-05-20T17:29:37Z")

</div>

My application needs to check whether a file contains valid XML. I’m  
using XmlSimple to do the parsing work but wondered how best to validate  
the XML in the file I’m parsing.

I’d appreciate your input.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [May 20, 2011, 6:11pm UTC](https://www.ruby-forum.com/t/validation-of-xml-with-xmlsimple/207214/2 "2011-05-20T18:11:57Z")

</div>

I also need to do validation please advise

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [May 20, 2011, 6:14pm UTC](https://www.ruby-forum.com/t/validation-of-xml-with-xmlsimple/207214/3 "2011-05-20T18:14:27Z")

</div>

[http://stackoverflow.com/questions/1007454/validation-of-xml-file-against-xsd-in-ruby](http://stackoverflow.com/questions/1007454/validation-of-xml-file-against-xsd-in-ruby)

xmlsimple can’t do validations using xsd/dtd etc

tom

On May 20, 2011, at 17:29 , Pale H. wrote:

> You received this message because you are subscribed to the Google G. “Ruby  
> on Rails: Talk” group.  
> To post to this group, send email to [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> To unsubscribe from this group, send email to  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid).  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
Maxwell Render CZ  
Autorizovany distributor Maxwell renderu pro Ceskou republiku
