Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: mbutcher commentedIt can be done in one line:
Comment #1.0
mbutcher CreditAttribution: mbutcher commentedtriangular brackets are not shown