REXML - external entities

T

Tobias

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
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top