Re: DOMDocument -> loadHTML() cuts off html input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

Thanks for your reply.

Yes there are quotes and 'special characters' in the list:
...
<option value="181">Acodev</option>
<option value="85">Africa Co-operative Action Trust</option>
<option value="251">Agence europ&eacute;enne pour le D&eacute;veloppement et la Sant&eacute;</option> <option value="226">Ag&ecirc;ncia de Not&iacute;cias Esperan&ccedil;a</option>
...

The list gets cut off after the 'Agence européenne pour le développement et la Santé'. What you're seeing is part of the raw html output.
When passed through saveHTML(), the character entities dissapear though.
Is this because of a configuration variable i need to set or unset on DOMDocument ?

The docs are very unclear on those, and I'm no XML expert. I've tried both with resolveExternals set to true and false.

How do you resolve those issues ?

greetz,

boro


Bastien Koert schreef:
Is there a quote in the data?
That is the usual culprit in my situations like that... bastien
Date: Wed, 1 Aug 2007 10:54:59 +0200> From: stijn@xxxxxxxxxxxxx> To: php-general@xxxxxxxxxxxxx> Subject: DOMDocument -> loadHTML() cuts off html input> > Hey List,> > In my application, I am loading html content into a DOMDocument using > loadHTML(). The DOMDocument is validated, then the element with a > certain ID tag is extracted and loaded into a node in the main > DOMDocument, which is then presented as html with saveHTML().> > This works fine and has worked fine for relatively large pages > (containing several <select> lists with up to 400 options in total).> > The problem I am now facing is a page with a single, relatively large > <select> list, i.e. some 330 options.> The html is generated as expected. However when I load it into a > DOMDocument and saveHTML(), the select list is cut off to about 30 > options. The remainder of the html content dissappears> and instead, the remaining open tags are closed, presumably by > DOMDocument's saveHTML() method.> > Any ideas as to why this behaviour is occurring and how to fix it ?> Further information available if needed.> > Thanks in advance,> > Stijn> > -- > PHP General Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux