REXML::Document parsing

C

Charles Sword

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

Attachments:
http://www.ruby-forum.com/attachment/946/test.xml
 
M

Mark T

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!


<FIELD NAME=3D"body">
Skip Navigation
<key>Infogain</key>
- The Customer Knowledge Company SEI CMM5 Level
<sep/>
INDIA : +91-120-2583745 Email : info@
<key>infogain</key>
com Home =BB News Desk Read the latest
<key>Infogain</key>
news, press releases and important announcements
<sep/>
</FIELD>
 
C

Charles Sword

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:
<FIELD NAME="url">http://www.infogain.com/</FIELD>

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top