CanadianPenguin
New member
...in the same way as the numbers? I wasn't sure how else to ask this question, so I apologize if it was a bit bland/confusing. Here's something close to what I'm actually trying to parse:
<xml>
<part>
<num>5</num>
<text>Hi there</num>
</part>
<part>
<num>2</num>
<text>lolol</num>
</part>
<part>
<num>9</num>
<text>Top</num>
</part>
<part>
<num>4</num>
<text>fasffs</num>
</part>
</xml>
I want to get the numbers inside all of the <num> tags, and then display the contents of the <text> tags in the descending order of the numbers.
For example, I want it to look like this:
Top
Hi there
fasffs
lolol
Any way to do this? I know simplexml pretty well but I'm not sure how I would pull this off.
<xml>
<part>
<num>5</num>
<text>Hi there</num>
</part>
<part>
<num>2</num>
<text>lolol</num>
</part>
<part>
<num>9</num>
<text>Top</num>
</part>
<part>
<num>4</num>
<text>fasffs</num>
</part>
</xml>
I want to get the numbers inside all of the <num> tags, and then display the contents of the <text> tags in the descending order of the numbers.
For example, I want it to look like this:
Top
Hi there
fasffs
lolol
Any way to do this? I know simplexml pretty well but I'm not sure how I would pull this off.