my $spec = $froody_method->structure; my $method_name = $froody_method->name; # create a new walker that knows about the spec my $walker = Froody::Walker->new($spec, "method name"); my $terse = Froody::Walker::Terse->new; my $xml = Froody::Walker::XML->new; $walker->from($terse)->to($xml); # walk $source turning it into xml my $xml = $walker->walk($data);
Walker classes are constucted with a description of the structure it will generate. That structure is a very specific grammar listing paths into the object that can be built.
Setting from and to designates the source and targets for the transformation, respectively. We currently provide two data structures
Froody::Walker::XML as transformation engines, which will both work bi-directionally.
Walks the structure of data with the source
Froody::Walker::Driver, returning a transformed version of the data as per the designation of the target.
Walks the data structure this object holds with the specification, starting at the part of the spec indicated by $xpath_key.
$parent_target is used for accumulation of results at the current level.
Sets the source driver.
Sets the target driver.
Small methods that get called a lot from subclasses.
Returns the local method spec for the given xpath. Returns the default method spec (text-only node) if there is no spac for that path.
return a list of the top-level node names in the response XML.
Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody
Copyright Fotango 2005. All rights reserved.
Please see the main Froody documentation for details of who has worked on this project.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.