Sax Parsing strange element with nokogiri

Posted by SHUMAcupcake on Stack Overflow See other posts from Stack Overflow or by SHUMAcupcake
Published on 2012-04-02T22:18:57Z Indexed on 2012/04/02 23:29 UTC
Read the original article Hit count: 156

Filed under:
|
|

I want to sax-parse in nokogiri, but when it comes to parse xml element that have a long and crazy xml element name or a attribute on it.. then everthing goes crazy.

Fore instans if I like to parse this xml file and grab all the title element, how do I do that with nokogiri-sax.

<titles>
    <title xml:lang="sv">Arkivvetenskap</title>
    <title xml:lang="en">Archival science</title>
</titles>

© Stack Overflow or respective owner

Related posts about ruby

Related posts about nokogiri