DomQuery::merge();

Merges another XML document with the current one. It will also replicate the merging document across all matched elements using the given XPath expression.

 $DomQuery = new DomQuery;
 $DomQuery->load($xml)->merge($more_xml, '//books', '//foo');

Definition:

public function merge($source, $merge_what, $merge_where)

Parameters:

Name Type Description
$source String The XML source document.
$merge_what String XPath expression to locate elements to merge.
$merge_where String XPath expression denoting the location of mergin elements.

Recent Discussions

No discussions yet!