Answer the question
In order to leave comments, you need to log in
How to return parent tag values when searching by xml?
Good afternoon. To work with xml I use simpleXML,
To search for a value I use
$users->xpath("//users/user/login[text()='test']");
Answer the question
In order to leave comments, you need to log in
$users->xpath("//users/user/login[text()='test']/ancestor::user");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question