Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

XML::Rules: Can hierarchy be changed?

by hoppfrosch (Scribe)
on Sep 29, 2010 at 11:03 UTC ( [id://862589]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    <root>
      <parent>p1 p2 <ch1>c1_1</ch1> p3 <ch2>c2</ch2> p4 <ch1>c1_2</ch1> p5
    +</parent>
    </root>
    
  2. or download this
    'root' => {
              'parent' => [
    ...
                          }
                          ]
              }
    
  3. or download this
    my $parser =  XML::Rules->new (
      rules => [
    ...
        ]
    );
    my $result = $parser->parsestring($xml);
    
  4. or download this
    # different Rule for "parent"
      parent => sub {$_[0]->{text} => $_[1]->{_content}},
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://862589]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-16 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found