How to skip invalid characters in XML file using PHP

后端 未结 7 1760
再見小時候
再見小時候 2020-12-01 05:51

I\'m trying to parse an XML file using PHP, but I get an error message:

parser error : Char 0x0 out of allowed range in

I think it\'

7条回答
  •  -上瘾入骨i
    2020-12-01 06:06

    Not a php solution but, it works:

    Download Notepad++ https://notepad-plus-plus.org/

    Open your .xml file in Notepad++

    From Main Menu: Search -> Search Mode set this to: Extended

    Then,

    Replace -> Find what \x00; Replace with {leave empty}

    Then, Replace_All

    Rob

提交回复
热议问题