views:

69

answers:

1

Using simpleDom.php to parse an xml file works fine in windows but failsin unix .

  <br />
    <b>Fatal error</b>:  Uncaught exception 'InvalidArgumentException' with message 'chunk is not well balanced
    ' in SimpleDOM.php:576
    Stack trace:
    #0 lib.php(367): SimpleDOM-&gt;insertXML('&lt;prebuilt.credi...')
    #1 save_document.php(15): sSaveDataForXML('xml//aa11.xml', NULL, '0::12::13::14::...', '??Group B strep...')
    #2 {main}
      thrown in <b> SimpleDOM.php</b> on line <b>576</b><br />

Being trying to fix these for day but not fruitful.

I know its something to do with the environment / php.ini setting ... but couldn't figure it out

A: 

According to the error message "chunk is not well balanced" there is apparently a problem with your XML. You should check it for well-formedness. If your environment differs, perhaps it gets truncated somewhere?

Also, when posting XML-related questions, please link to your XML document or a sample of your XML document.

Josh Davis