carcassonne has asked for the wisdom of the Perl Monks concerning the following question:
Anyone out there using XML::Twig successfully in reading XML entities ? What I have is along the following lines. A version var is stored in an entities file, and a reference is made is a main XML file:
main XML file:
<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ <!ENTITY % component-entities SYSTEM "component.ent"> %general-entities; ]> <component>Engine-&engine-version;</component>
Whereas the entities file has:
<!ENTITY engine-version "3.2">
I've added a Dumper on the file loaded by XML::Twig and the version for instance is not interpreted in memory.
Is it possible to access these values using Twig ? If not, which XML module do you use to achieve this in perhaps the most simplest way?
Cheers.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig and ENTITY declarations
by carcassonne (Pilgrim) on Mar 18, 2009 at 00:01 UTC | |
|
Re: XML::Twig and ENTITY declarations
by mirod (Canon) on Mar 18, 2009 at 05:34 UTC | |
by carcassonne (Pilgrim) on Mar 21, 2009 at 15:00 UTC | |
|
Re: XML::Twig and ENTITY declarations
by Anonymous Monk on Mar 18, 2009 at 04:59 UTC | |
by carcassonne (Pilgrim) on Mar 21, 2009 at 14:46 UTC |