The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

SUBCLASS METHODS

When writing a walker subclass, override these methods to define your behaviour.

init_source( source )

Should return a new, black source data structure that will be used as the source for the given xpath.

init_target( xpath, parent )

Should return a new, blank target data structure that will be used to store data for the given xpath. The parent DS is passed in, in case it will depend on it in some way (for instance, XML::LibXML documents should be created from the same XML::LibXML::Document object).

validate_source( source, xpath )

Should return true is the source data structure, assumed to represent the source at the given xpath location, validates against the local spec.

read_text( source, xpath )

This method should return the text content of the node in 'source', which is in the original document at the given xpath location.

read_attribute( source, xpath, name )

This method should return the value of the named attribute from source, which is in the original source document at the given location.

child_sources( source, xpath, child name )

This method should return a list of new source data source elements under source with the given child element name.

write_text( target, xpath, value )

This should insert a text value into 'target', which is in the target document with the given path.

It must return the new target object (you can modify or replace it, but you must return the result).

write_attribute( target, xpath, name, value )

This should set the attribute on the given target to the given value.

It must return the new target object (you can modify or replace it, but you must return the result).

add_child_to_target( target, xpath, child name, child )

Should add the new child object, 'child', to 'target' with the element name 'child name'.

It must return the new target object (you can modify or replace it, but you must return the result).

spec_for_xpath( xpath )

Returns the specification for a given xpath.

BUGS

None known.

Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody

AUTHOR

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.

SEE ALSO

Froody, Froody::Walker