<div>In QueryPath it would be:</div>
<div> </div>
<div><?php</div>
<div>$xml = '<this><br><that parm1="a" parm2="b" parm3="c">red</that><br><that parm1="e" parm2="f" parm3="d">blue</that><br></this>';</div>
<div> </div>
<div>// Loop through all <that> elements...</div>
<div>foreach (qp($xml, 'that') as $that) {</div>
<div> </div>
<div> // Get the text for each <that> element.</div>
<div> print $that->text();</div>
<div> </div>
<div>}</div>
<div>?><br></div>
<div> </div>
<div class="gmail_quote">On Thu, Mar 24, 2011 at 8:09 PM, <span dir="ltr"><<a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div text="#000000" bgcolor="#ffffff">When all else fails, and #xml, ##php and #drupal-support come up empty...ask the folks who actually code :)<br><br>I have an xml structure that has<br><br><this><br><that parm1="a" parm2="b" parm3="c">red</that><br>
<that parm1="e" parm2="f" parm3="d">blue</that><br></this><br><br>I've tried simplexml and a few third-party scripts, one that loads the xml into an associative array rather than an object, and nothing lets me get at 'red' or 'blue'. When I use dsm() on the results, for example, in the case of the object with simplexml I get only one 'that' and do not get its contents. When I use the script that creates the array, I get both that's, and all their parms as elements, but not the colors.<br>
<br>I'm curious what else people are using.<br><br>Jeff<br>
<div>-- <br><em>I am a non sequitur. Beware, the contents were packaged where peanuts are processed.</em>
<p style="MARGIN-BOTTOM: 0in"><img border="0" name="ayenlogo" vspace="30" align="left" width="36" height="54"><font style="FONT-SIZE: 8pt" size="1">Ayen Designs </font><font face="Times New Roman, serif"><font style="FONT-SIZE: 8pt" size="1"><br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font> <br><font face="Times New Roman, serif"><font style="FONT-SIZE: 8pt" size="1"><a href="tel:404-271-9734" target="_blank">404-271-9734</a><br>Web:<a href="http://ayendesigns.com/" target="_blank">ayendesigns.com</a><br>
Blog: <a href="http://theaccidentalcoder.com/" target="_blank">theAccidentalCoder.com</a><br>Drupal: <a href="http://drupal.org/user/367108" target="_blank">j. ayen green</a> (367108)<br>IRQ: j_ayen_green<br>IM (Yahoo) baalwww (MSN) <a href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns | Facebook: ayendesigns | Twitter: @ayendesigns</font></font></p>
<p style="MARGIN-BOTTOM: 0in"><font face="Times New Roman,
serif"><font style="FONT-SIZE: 8pt" size="1"><br><br>Ayen Designs is the computer services division of <img border="0" name="acmelogo" align="absMiddle" width="80" height="31"></font></font></p></div></div></blockquote>
</div><br><br clear="all"><br>-- <br><a href="http://technosophos.com">http://technosophos.com</a><br><a href="http://querypath.org">http://querypath.org</a><br>