[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

REXML - external entities

tobias.grimm

9/4/2003 11:08:00 AM

Hi!

Unfortunately, the REXML-site seems to be down, but maybe you can help
mw with this:

I'm trying to read a xml document, that includes external entities.
Basically it looks like this:

components.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components [
<!ENTITY comp1 SYSTEM "comp1.xml">
]>
<components>&comp1;</components>

comp1.xml:

<?xml version="1.0" encoding="UTF-8"?>
<component name="comp1"/>

When I parse this with:

root = (REXML::Document.new(File.new("components.xml"))).root
puts root.text

.... it doesn't resolve the external entity. What am I doing wrong, or
doesn't REXML support external entities?

Greetings,

Tobias