PHP Tutorial DOM

Attribute

  1. Add new attribute in PHP

XElement

  1. Add new child at the end of the children in PHP
  2. Copy nodes between documents in PHP
  3. Remove child from list of children in PHP
  4. Retrieve a node specified by index in PHP
  5. Use the contextnode parameter to shorten our expression in PHP

Document

  1. Check if the DOM implementation implements a specific feature in PHP
  2. Creates a new DOMDocument object with version and encoding in PHP

Comment

  1. Create a new DOMComment object in PHP

Element

  1. Create a new DOMElement object in PHP
  2. Create new element node with an associated namespace in PHP
  3. Creating a new element and inserting it as root in PHP
  4. Output the title of the second book node in the DOM document: in PHP
  5. Take a node of a DOM document and make it into a SimpleXML node in PHP

ProcessingInstruction

  1. Create a new DOMProcessingInstruction object in PHP

Text

  1. Create a new DOMText object in PHP

DTD

  1. Create an XML document with an attached DTD in PHP

EntityReference

  1. Creates a new DOMEntityReference object in PHP

XPath

  1. Evaluate the given XPath expression and returns a typed result if possible in PHP
  2. Evaluate the given XPath expression to get all the english books in PHP
  3. Get an XPath for a node in PHP
  4. Register PHP functions as XPath functions in PHP

Parse

  1. Get line number for a node in PHP
  2. Load HTML from a file and create DOMDocument in PHP
  3. Load HTML from a string and create DOMDocument in PHP
  4. Load XML from a file and create DOMDocument in PHP
  5. Load XML from a string and create a Document in PHP
  6. Load XML from a string and do static invocation of loadXML in PHP

Save

  1. Save the internal XML tree back into a file in PHP
  2. Save the internal XML tree back into a string in PHP
  3. Save the internal document into a file using HTML formatting in PHP
  4. Save the internal document into a string using HTML formatting in PHP
  1. Search for all elements with given local tag name in PHP
  2. Search for all elements with given tag name in specified namespace in PHP
  3. Search for an element with a certain id in PHP

XInclude

  1. Substitutes XIncludes in a DOMDocument Object in PHP

Validate

  1. Validate the document based on its DTD in PHP
  2. Validate your XML file while loading in PHP




















Home »
  PHP Tutorial »
    XML »




DOM
SimpleXML
SimpleXMLElement
XML Parser