in reply to XML issue

One way of doing this would be (Ihave fixed your XML BTW):

use XML::DOM; my $xml =<<EX; <type name="bla"> <display>BLA BLA</display> <data> <item>FIRST</item> <item>SECOND</item> </data> <config> <field id="test" name="test1"> <display>MY TEST</display> </field> </config> </type> EX + my $parser = new XML::DOM::Parser; my $doc = $parser->parse($xml); + my $nodes = $doc->getElementsByTagName ("config"); + foreach my $node (@{$nodes}) { print $node->toString(); }
Of course this is not using XML::Smart - but I had issues installing it and gave up.

/J\

Replies are listed 'Best First'.
Re^2: XML issue
by gmpassos (Priest) on Jul 22, 2004 at 21:36 UTC
    What issues installing it, since it doesn't have dependencies?

    Graciliano M. P.
    "Creativity is the expression of the liberty".

      You mean other than the Object::MultiType?

      /J\

        Humm, yes. Well, Object::MultiType was built for XML::Smart, it's out of the box just to be used with other modules.

        But I still want to know about your issues.

        Graciliano M. P.
        "Creativity is the expression of the liberty".