in reply to Re^2: XML::Twig - Parsing XML file with incorrect encoding in declaration
in thread [SOLVED] XML::Twig - Parsing XML file with incorrect encoding in declaration

If it is too big to slurp .. you could "pipe-filter" it through.

I haven't tried this, but you should be able to setup a FIFO , and pass a handle to LibXML to read.

Then read your XML file, a record at a time, filter out the encoding garbage, and feed it to the FIFO.

Probably need 2 threads to make this work in a single program.

                All power corrupts, but we need electricity.

  • Comment on Re^3: XML::Twig - Parsing XML file with incorrect encoding in declaration

Replies are listed 'Best First'.
Re^4: XML::Twig - Parsing XML file with incorrect encoding in declaration
by ateague (Monk) on Sep 18, 2017 at 13:42 UTC
    I haven't tried this, but you should be able to setup a FIFO

    Would be slightly more difficult to do on Windows, but it is an option to experiment with. Sounds like a good opportunity to experiment and dabble with threads...