Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6790 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36716 invoked by uid 1010); 5 Jan 2004 11:35:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36691 invoked from network); 5 Jan 2004 11:35:51 -0000 Received: from unknown (HELO smtprelay01.ispgateway.de) (62.67.200.156) by pb1.pair.com with SMTP; 5 Jan 2004 11:35:51 -0000 Received: (qmail 15848 invoked from network); 5 Jan 2004 11:35:50 -0000 Received: from unknown (HELO lisaserver) ([pbs]293331@[217.235.105.75]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 5 Jan 2004 11:35:50 -0000 To: internals@lists.php.net Content-Type: text/plain Message-ID: <1073302547.5081.8.camel@lisaserver> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 05 Jan 2004 12:35:47 +0100 Content-Transfer-Encoding: 7bit Subject: RE: domxml and validation From: liste@ja-web.de (Jens Ansorg) I try to use domxml to work with xhtml documents. I load a file domxml_open_file($filePath) and then use xpath to get content from certain elements out of this document. It works fina as long as there are no special chars in the xhtml file, html entities like   ü etc. searching the web I came across this article from the list http://www.zend.com/lists/php-dev/200206/msg00552.html so I changed my code to use domxml_open_file($filePath,DOMXML_LOAD_VALIDATING,$error) but this seems not to work for xhtml files with the regular html dtd my documents start like So what happens? When I turn on the validating Apache takes about 2 minutes to load the page (it tries to load the dtd?) and then I get the $error Array ( [0] => Array ( [line] => 3 [col] => 26 [directory] => . [file] => ./content.html [errormessage] => Validation failed: no DTD found ! ) [1] => Array ( [errormessage] => Entity 'uuml' not defined [nodename] => h2 [line] => 9 [col] => 72 [directory] => . [file] => ./content.html ) ) "no DTD found" So, question: does this work for xhtml at all? What yould I need to change to make it work? thanks Jens -- Jens Ansorg