in reply to Perl and Lib::XML usage

You are searching for a subset of

.../MAPPING/TRANSFORMATION/@TYPE/TRANSFORMFIELD/@TYPE

An attribute cannot have a child element, so that can't possibly match. Solution:

for ($root->findnodes( '/POWERMART/REPOSITORY/FOLDER/MAPPING' . '/TRANSFORMATION[@TYPE="Sequence"]' . '/TRANSFORMFIELD[@TYPE="bigint"]' )) { $_->setAttribute('TYPE', 'integer'); }

Square brackets specify which nodes to filter through, like a SELECT clause in SQL.

Replies are listed 'Best First'.
Re^2: Perl and Lib::XML usage
by Anonymous Monk on Oct 26, 2010 at 11:52 UTC
    Thanks a bunch Perl Monks. This particular solution work a treat. But thanks to all who contributed, each one of you had valid comments that I can learn from.