|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-01 19:17 UTC] bjori@php.net
[2006-03-01 22:14 UTC] taymir at gmail dot com
[2006-03-01 22:25 UTC] rrichards@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 03:00:01 2025 UTC |
Description: ------------ I use DOMDocument::loadHTML(...) method to create DOM-tree from html-document. I want to modify some attributes of such tags as form, select, option, input. The code works as it should for all tags except <input ...>. I can't get input-element by ID. Reproduce code: --------------- <?php $text = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><input id="test">'; $xml = new DOMDocument(1.0); $xml->loadHTML($text); var_dump($xml->getElementByID('test')); ?> Expected result: ---------------- object(DOMElement)#2 (0) { } Actual result: -------------- NULL