in reply to XML Twig entities

Aside from the contradiction of successfully parsing XML without parsing entities, it sounds like the wrong solution to an unspecified problem. What problem are you actually trying to solve?

Replies are listed 'Best First'.
Re^2: XML Twig entities
by rob50 (Initiate) on Apr 09, 2009 at 19:32 UTC
    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

      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?