> I've never parsed XML with PHP, but it might help if you can show the
> document that's breaking the parser, and also let us know if other
> documents are working fine...
> -Lorenzo


The document is like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<volanta>Some text</volanta>
<titulo>Some text</titulo>
<bajada>Some text</bajada>
<parrafo>Some text</parrafo>
<copy>Whomever 2001</copy>

Up to now, I solve the problem modifying the lines saying
    > while ($data = $file) {
    > if (!xml_parse($xml_parser, $data, 0)) {
    > die(sprintf("XML error: %s at line %d",
    > xml_error_string(xml_get_error_code($xml_parser)),
    > xml_get_current_line_number($xml_parser)));
    > }
    > }

    > xml_parse($xml_parser, $data, 0);

I'd noticed that I don't need to read the document line by line.

Regards and thanks,

+--                                         --+
       Tomás García Ferrari
+--                                         --+

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to