Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link 2 XML Files into a filtered list

Status
Not open for further replies.

FAM

Technical User
Jan 13, 2003
345
GB
I currently have 2 xml files in which i need to link so to filter them, my query as it stands is.
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';
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
Code:
$query = '/ZZZ/XXX/SSS/RRR[. $query1]';
but to no avail?

Can anyone tell me how this can be achieved?
Thanks
 

see thread426-1167001



A smile is worth a thousand kind words. So smile, it's easy! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top