in reply to Re: XML Twig entities
in thread XML Twig entities

I just need to grab the text from certain elements to make document term vectors for querying. I just need the "words" and an id. The problem is I'm parsing thousands of XMLs from various external sources. I don't have entity lists for all of them and I can't predict what entities will appear. And I don't need the entities anyway. Thanks, Rob

Replies are listed 'Best First'.
Re^3: XML Twig entities
by ikegami (Patriarch) on Apr 09, 2009 at 19:39 UTC

    I've tried, "my $twig = new XML::Twig(expand_external_ents => -1);" but I get the same error.

    I seem to have missed that originally. What error is that?

    I just need to grab the text from certain elements [...] And I don't need the entities anyway.

    The entities represent text.


    [ For the rest of the monks ]

    I've tried, "my $twig = new XML::Twig(expand_external_ents => -1);" but I get the same error.

    I seem to have missed that originally. What error is that?

    I just need to grab the text from certain elements [...] And I don't need the entities anyway.

    The entities represent text.

      I'm sorry, I don't understand?
        I added a version with the entities decoded.