[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

XSD and XML

dominik.aumayr@gmail.com

7/11/2007 8:33:00 PM

Hi!
Is there a way to deal with XML-files in Ruby? And further: is there a
(existing) solution/way how to parse/validate XML-files against a XML-
Schema (XSD)?

Thanks for any help!
Dominik A.

4 Answers

adam.peters1

7/11/2007 10:22:00 PM

0

On Jul 11, 4:33 pm, "dominik.aum...@gmail.com"
<dominik.aum...@gmail.com> wrote:
> Hi!
> Is there a way to deal with XML-files in Ruby? And further: is there a
> (existing) solution/way how to parse/validate XML-files against a XML-
> Schema (XSD)?
>
> Thanks for any help!
> Dominik A.

REXML is the Ruby Library for parsing xml docs. Not sure if it
validates though.
http://www.germane-software.com/softw... has a tutorial and the
documentation. The documentation is also available with the standard
RDoc.

brabuhr

7/11/2007 10:48:00 PM

0

On 7/11/07, adam.peters1@gmail.com wrote:
> On Jul 11, 4:33 pm, "dominik.aum...@gmail.com" wrote:
> > Is there a way to deal with XML-files in Ruby? And further: is there a
> > (existing) solution/way how to parse/validate XML-files against a XML-
> > Schema (XSD)?
>
> REXML is the Ruby Library for parsing xml docs. Not sure if it
> validates though.

There is also libxml-ruby:
http://libxml.rubyforg...

Also, I have used JRuby to use Java XML processing libraries.

dominik.aumayr@gmail.com

7/12/2007 9:01:00 AM

0

I finally found (after I googled "libxml-ruby xsd") a "Recipe" how to
validate XML-files against DTD/XSD!
Here is the link: http://codeidol.com/other/rubyckbk/XML-and-HTML/Validating-an-XML...
I think it's using "libxml-ruby", but (as I understood it) it is not a
"pure-Ruby"-solution because it's using a C library. But that's no
problem.

Thanks for your hints!

Best Regards,
- dominik aumayr

Agamemnon

9/3/2012 10:28:00 PM

0


"The Doctor" <doctor@doctor.nl2k.ab.ca> wrote in message
news:k239uk$o23$1@gallifrey.nk.ca...
> In article <J56dnVvO3MN1vdjNnZ2dnUVZ7q2dnZ2d@eclipse.net.uk>,
> Agamemnon <agamemnon@hello.to.NO_SPAM> wrote:
>>
>>"The Doctor" <doctor@doctor.nl2k.ab.ca> wrote in message
>>news:k22f8r$iko$1@gallifrey.nk.ca...
>>> In article <k216db$99q$1@dont-email.me>,
>>> Arthur Lipscomb <arthur@alum.calberkeley.org> wrote:
>>>>On 9/2/2012 2:59 PM, The Doctor wrote:
>>>>> In article <z5Sdna4IFq7C6N7NnZ2dnUVZ8kudnZ2d@eclipse.net.uk>,
>>>>> Agamemnon <agamemnon@hello.to.NO_SPAM> wrote:
>>>>>>
>>>>>> "The Doctor" <doctor@doctor.nl2k.ab.ca> wrote in message
>>>>>> news:k1vhdj$9l1$1@gallifrey.nk.ca...
>>>>>>> In article <g_2dnb6geoIlWd_NnZ2dnUVZ8sidnZ2d@eclipse.net.uk>,
>>>>>>> Agamemnon <agamemnon@hello.to.NO_SPAM> wrote:
>>>>>>>>
>>>>>>>> "The Doctor" <doctor@doctor.nl2k.ab.ca> wrote in message
>>>>>>>> news:k1uf40$rr8$1@gallifrey.nk.ca...
>>>>>>>>> i9.5/10 .
>>>>>>>>>
>>>>>>>>> Who could have thought is bur Moffat!
>>>>>>>>>
>>>>>>>>> Parliment ofthe Daleks!! Humans disguise.
>>>>>>>>>
>>>>>>>>> Most of all Human convereted!!
>>>>>>>>>
>>>>>>>>
>>>>>>>> Dalek Invasion of Earth
>>>>>>>
>>>>>>> Nope that was collaborators.
>>>>>>
>>>>>> Robomen.
>>>>>>
>>>>>
>>>>> / collaborators.
>>>>>
>>>>
>>>>Didn't they undergo some type of mind control process?
>>>>
>>>
>>> And made them into the servants of the occupier.
>>>
>>>>
>>>>>>>
>>>>>>>> Resurrection of the Daleks
>>>>
>>>>
>>>>And Remembrance of the Daleks.
>>>>
>>>>"2, 4, 6, 8, there's a Doctor at the Gate."
>>
>>"1, 3, 5, 7, blow the Daleks up in Devon."
>>
>>Dalek Invasion anyone?
>>
>>>
>>> Resurrection should have never been. The Movellans
>>> should have wiped the Daleks out for good!
>>
>>The Movellans were nothing more than a race of mobile computers unable to
>>think out of the box until Resurrection.
>>
>
> Virus that rendered the Daleks useless.
>
>>Nevertheless Revelation is probably the one that should never have been.
>>The
>>Daleks were supposed to be about preserving the racial purity of the
>>Kaleds
>>by growing new mutants in incubators, not converting the dead or dying?
>>That
>>was Cybermen, and their storylines all fell apart after it became obvious
>>they couldn't breed.
>>
>
> Cybermen needed converts as proven in Attack.

Only because they couldn't breed. Do female Cybermen have a womb? Was that
established in Cyberbird?

>
>>I think both races need a reboot from basic principles.
>>
>>First the Daleks.
>>
>>What's the point of them conquering the universe? What would they do with
>>it
>>once they were the only surviving lifeform?
>>
>>Let's go back to basics.
>>
>>The Daleks were created survive the radiation caused by the Dal vs. Thal
>>war
>>and then after that they would return to their original humanoid form. So
>>why not have the Daleks do just that now they've conquered Skaro and do
>>the
>>same after they've conquered other planets too. Lots of good stories there
>>and I expect a share of the royalties.
>
> And ditch the Time Wars. And then Remembrance establish Skaro as burnt
> up.
>

Put an end to them be going back in time and changing Dalek history. Then
you can have the Timelords, Gallifrey and Skaro back all for the same price.

>>
>>Now for the Cybermen.
>>
>>The whole idea behind them was that they evolved from replacing all they
>>body parts with mechanical ones so that they could continue to live on,
>>and
>>then they got into a war with Earth after their own planet died. So how
>>about another reboot and have Cybermen living alongside humans on their
>>own
>>planet, fighting its wars together then moving on to other planets and
>>conquering them and rebuilding themselves with mechanical parts in order
>>to
>>prolong their lives, and then they could breed as many Cypbermen as they
>>want and do away with pointless conversions of alien races? I expect a
>>share of the royalties from that idea too.
>>
>>
>>
>
> Gnesis of the Cybermen anyone?

RTD did that in Rise of the Cybermen/Age of Steel. It all needs to be
undone.

>
> Time wars need to be erased with the White Guardian pleading with the
> Doctor to get the Key to Time to resotre order. Of Course
> the Black Guardian might get in the way.

Or whoever's producing the show can do it another way.