# Pastebin 6meVfH3B #`[ some useful XML lookup commmands my $head = $html.elements(:TAG, :SINGLE); my @stylesheets = $head.elements(:TAG, :rel); my @middle = $table.elements(:!FIRST, :!LAST); my @not-red = $div.elements(:class(* ne 'red')); # find all elements by class name my @elms-by-class-name = $html.elements(:RECURSE(Inf), :class('your-class-name')); #and for insert, replace... my $id = $ix.elements(:TAG).first; say $id; my $ni = XML::Text.new( text => 'Nah Monthly' ); $id.insert( $ni ); my $nt = XML::Text.new( text => 'Nah Monthly' ); $ar[3].replace( $ar[3].nodes[0], $nt ); say $ar[3].nodes[0]; my $ar = $ix.root; say $ar.name; for 1..10 -> $i { say "article child $i is:" ~ $ar[$i]; } say $ar[3].attribs; say $ar[3].nodes; say $ar[3].nodes[0].WHAT; say $ar[3].nodes[0]; #]