I currently have 2 xml files in which i need to link so to filter them, my query as it stands is.
If i output $query it works fine but i am trying to filter it so as if file1 value = file2 value it outputs the value, i have been trying with
but to no avail?
Can anyone tell me how this can be achieved?
Thanks
Code:
$doc = DOMDocument::Load('./file1.xml');
$doc1 = DOMDocument::Load('./file2.xml');
$doc->preserveWhiteSpace = true;
$doc1->preserveWhiteSpace = true;
$xpath = new DOMXPath($doc);
$xpath1 = new DOMXPath($doc1);
$query1 = '/AAA/BBB/CCC';
$query = '/ZZZ/XXX/SSS/RRR';
Code:
$query = '/ZZZ/XXX/SSS/RRR[. $query1]';
Can anyone tell me how this can be achieved?
Thanks