REXML - external entities

Discussion in 'Ruby' started by Tobias, Sep 4, 2003.

  1. Tobias

    Tobias Guest

    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
     
    Tobias, Sep 4, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Damphyr
    Replies:
    2
    Views:
    154
    Damphyr
    Jul 16, 2003
  2. Daniel Berger

    rexml error - REXML::Validation

    Daniel Berger, Oct 12, 2004, in forum: Ruby
    Replies:
    2
    Views:
    162
    Henrik Horneber
    Oct 12, 2004
  3. Pawel Szymczykowski

    REXML and entities

    Pawel Szymczykowski, Mar 31, 2006, in forum: Ruby
    Replies:
    0
    Views:
    88
    Pawel Szymczykowski
    Mar 31, 2006
  4. Frank Reiff
    Replies:
    7
    Views:
    231
    Eric Hodel
    Aug 25, 2009
  5. Jim Higson
    Replies:
    3
    Views:
    240
    Eric Amick
    Jul 25, 2004
Loading...

Share This Page