[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

REXML::Document parsing

Charles Sword

11/10/2007 9:40:00 PM

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-...attachment/94...

--
Posted via http://www.ruby-....

2 Answers

Mark T

11/10/2007 10:04:00 PM

0

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>

Charles Sword

11/11/2007 12:38:00 AM

0

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/<...

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!
>
>
> <FIELD NAME="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 � News Desk Read the latest
> <key>Infogain</key>
> news, press releases and important announcements
> <sep/>
> </FIELD>

--
Posted via http://www.ruby-....