Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Below is my test code...I'm able to retrieve the tabs data but can't seem to determine the number of buttons and the params for each.<?xml version="1.0" encoding="utf-8"?> <install type="module" version="1.0.0"> <name>TEST</name> <notebook_tabs> <tab index="1">Create <button internal_name="test1" parent="-1" text="button 1" x_coordinate="5" y_coordinate="5" x_size="-1" y_size="-1" evt_1="EVT_BUTTON" evt_1_function="testclick" /> <button internal_name="test2" parent="-1" text="button 2" x_coordinate="50" y_coordinate="50" x_size="-1" y_size="-1" evt_1="EVT_BUTTON" evt_1_function="testclick2" /> </tab> <tab index="2">Assign</tab> </notebook_tabs> </install>
Any help or suggestions would be greatly appreciated.use strict; use warnings; use XML::Simple; my $config = XMLin('C:\path\tp\test.xml'); use Data::Dumper; #print Dumper($config); my @tabs = $config->{notebook_tabs}; print Dumper(@tabs);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML Parsing questions and recommendations?
by moritz (Cardinal) on Oct 08, 2008 at 14:49 UTC | |
|
Re: XML Parsing questions and recommendations?
by toolic (Bishop) on Oct 08, 2008 at 15:02 UTC | |
by Anonymous Monk on Oct 08, 2008 at 18:13 UTC | |
by Anonymous Monk on Oct 08, 2008 at 18:23 UTC | |
|
Re: XML Parsing questions and recommendations?
by Your Mother (Archbishop) on Oct 08, 2008 at 16:52 UTC |