in reply to Re: Filtering large XML files
in thread Filtering large XML files

Thanks, this might work. Do you have any idea how to go about the <doc> node? I cannot simply use copyCurrentNode on that one. When I do this:

if ('doc' eq $r->name and XML_READER_ELEMENT == $r->nodeType) { print $r->copyCurrentNode(0)->toString; }

I get:

<doc attr1=".." attr2=".."/>

(an empty, self-closed <doc/>). Is there a clean way to correctly output it as just an opening XML_READER_ELEMENT?