xmlArray::fetch

Description

Retrieves the textual value of the specified path.

Syntax

string xmlArray::fetch (string $path[, bool $get_elements])



Parameter $path

Expected type: String
Description: The path to the element to fetch



Parameter $get_elements

Expected type: Boolean
Description: If true, returns any child elements of the specified path. Default is false.



Return value

Expected type: String
Description:


Notes

  • If get_elements is true, elements will be returned as well
  • Example: $data = $xml->fetch('html/head/title');
Advertisement: