> 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

Hi,

The document is like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<articulo>
<volanta>Some text</volanta>
<titulo>Some text</titulo>
<bajada>Some text</bajada>
<parrafo>Some text</parrafo>
<url>http://whatever.com/</url>
<copy>Whomever 2001</copy>
</articulo>

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)));
    > }
    > }

into
    > 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


+--                                         --+
       Tomás García Ferrari
       Bigital
       http://bigital.com/
+--                                         --+



--
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