I'm trying to simply retrieve some info from a OpenOffice Draw document section using XML::Twig. I have tried several variations but can't get to the data inside the section.
I'd like to be able to read the 'draw:name' in the following:
<draw:frame draw:id="id2" draw:layer="layout" draw:name="objectName" d +raw:style-name="gr1" draw:text-style-name="P3" [svg skipped] <draw:text-box> <text:p text:style-name="P1"> <text:span text:style-name="T2">objectData</text:span> </text:p> </draw:text-box> </draw:frame>
I can get the 'objectData' text of that draw:frame section. How can the draw:name attribute be read ? Here's what I do to get the text:
my $twig = XML::Twig->new ( parse_param_ent => 1, twig_handlers => { 'draw:frame' => \&getDrawInfo, }, ); $twig->parsefile("file.xml"); sub getDrawInfo { my ($t, $data)= @_; print "DEBUG " . $data->text . "\n"; }
I've tried accessing subsections of draw:frame in many ways although none of them returned the draw:name attribute
Thanks for any suggestions/insight.
In reply to XML::Twig and oodraw by carcassonne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |