I'm loo开发者_如何学JAVAking to run some kind of loop on some optional XML data.
Nodes would potentially look like this:
<link1>
<url>http://www.bleh.com</url>
<text>Click here</text>
</link1>
<link2>
<url>bleh.com</url>
<text>Click here</text>
</link2>
What would be the best method to determine if these nodes exist and parse them accordingly?
If you're using SimpleXML, then you can simply use isset() to determine whether a node exists.
精彩评论