Top "Domdocument" questions

DOMDocument refers to a class encapsulating the DOM (Document Object Model).

php DomDocument, require first item only

Hello I have use DOMDocs in the past but I am stuck how to do this. $xmldoc = new DOMDocument(); $xmldoc-&…

php domdocument
How to select multiple attributes for XPath query

Possible Duplicate: How do I select multiple sets of attributes within an XML document using XPath? My HTML code: <…

php html xpath domdocument domxpath
xpath to exclude elements that have a class

I'm trying to select all dom elements that have id="mydiv" but exclude the ones that also have the class="…

php dom xpath domdocument
PHP - DOMXpath - Get the result

I have errors when I want to print the result of an evaluate expression with XPath. $url = $xpath->evaluate(…

php xpath domdocument domxpath evaluate
How can I extract all anchor tags, their hrefs and their anchor text within a string?

I need to process links within an html string in several different ways. $str = 'My long <a href="http://…

php regex preg-replace preg-match domdocument
DOMDocument: Ignore Duplicate Element IDs

I'm putting some page content (which has been run through Tidy, but doesn't need to be if this is a …

php domdocument tidy
PHP DOMNode insertAfter?

I am a bit stuck on how to reorder nodes. I am trying to add two simple "move item up" …

xml dom domdocument insertafter
PHP DOMDocument replace DOMElement child with HTML string

Using PHP I'm attempting to take an HTML string passed from a WYSIWYG editor and replace the children of an …

php dom domdocument
Adding style tags to head with PHP DOMDocument

I want to create and add a set of <style> tags to the head tags of an HTML …

php css domdocument appendchild createelement
removing doctype while saving domdocument

I am parsing and fetching html documents to DOMDocument. Those documents are child forms that will be displayed inside another …

php domdocument skip