# REXML::Document parsing

**URL:** <https://www.ruby-forum.com/t/rexml-document-parsing/119820>\
**Category:** Ruby\
**Created:** [November 10, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/rexml-document-parsing/119820 "2007-11-10T22:40:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [November 10, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/rexml-document-parsing/119820/1 "2007-11-10T22:40:29Z")

</div>

I’ve attached a file that REXML fails to parse correctly. I can’t see  
anything wrong with it. Could anyone else check and see if you get the  
same results or notice anything wrong with the file? I get random  
unclosed token errors when I do the following:

doc = REXML::Document.new File.new(“public/test.xml”)

Any help would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [November 10, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/rexml-document-parsing/119820/2 "2007-11-10T23:05:10Z")

</div>

Hi Charles/Chas/Chuck…

Is there an xml .convention. that makes /sep a key to an implied  
separation descriptor?

I canna approach the tough ones… Xpath iteration … I’m still  
working on them!

Skip Navigation Infogain - The Customer Knowledge Company SEI CMM5 Level INDIA : +91-120-2583745 Email : info@ infogain .com Home » News Desk Read the latest Infogain news, press releases and important announcements

---

<div class="post-metadata">

**Author:** ![valdar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5a626/32.png) [@valdar](https://www.ruby-forum.com/u/valdar)\
**Post date:** [November 11, 2007, 1:38am UTC](https://www.ruby-forum.com/t/rexml-document-parsing/119820/3 "2007-11-11T01:38:27Z")

</div>

Mark,

Thanks for the help. I’m not aware of a convention. Do you think it  
would be easier to just use a stream parser? If so, how would I address  
elements like:  
[http://www.infogain.com/](http://www.infogain.com/)

It seems like I can parse the doc via a stream parser but I’m just not  
sure how to address some of the elements/attributes.

Thanks,  
Charles

Any further input would be appreciated. Mark T wrote:

> Hi Charles/Chas/Chuck…
> 
> Is there an xml .convention. that makes /sep a key to an implied  
> separation descriptor?
> 
> I canna approach the tough ones… Xpath iteration … I’m still  
> working on them!
> 
> Skip Navigation Infogain - The Customer Knowledge Company SEI CMM5 Level INDIA : +91-120-2583745 Email : info@ infogain .com Home ï¿½ News Desk Read the latest Infogain news, press releases and important announcements
