Active
Project:
QueryPath
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 07:35 UTC
Updated:
29 Jul 2011 at 15:17 UTC
Hi,
I want to know if this is possible by QP. I have a xml structure like this
?contactWebsites? HTTP://WWW.a.COM/ ?/contactWebsites?
?contactWebsites? HTTP://WWW.b.COM/ ?/contactWebsites?
?contactWebsites? HTTP://WWW.c.COM/ ?/contactWebsites?
?contactwebsiteSize? 3 ?/contactwebsiteSize?
* I have replaces triangular brackets by question marks
Now I want to traverse the xml so that I can store all 3 websites in a single field as comma separated value. For eg as a,b,c.
I have done something like this
$numberofweburl = $update_profile->top('contactwebsiteSize')->text();
for($i=0;$i<=$numberofweburl;$i++){
// dont know what to write here !!
}
Now I don't know if it is possible, if yes can anyone let me know how ?
Comments
Comment #1
mbutcher commentedIt can be done in one line:
Comment #1.0
mbutcher commentedtriangular brackets are not shown