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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XPATH Query failing...

Status
Not open for further replies.

Quickfix99

Technical User
May 16, 2007
27
CA
I have some simple xml:

<users>
<title>Floor1</title>
<user>
<fullname>John Doe</fullname>
<ID>Binary Avenue 1234 FL</ID>
<email>john@john-domain.com</email>
<lat>2</lat>
<lon>4</lon>
</user>
</users>

I am trying to retrieve the value of "lat" where "fullname=John Doe" using this PHP based xpath expression:

$lat = $users->xpath('/users/user/[fullname="Janet Smith"]');

Apparently my expression is invalid.

Any ideas?

QF

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top