You should consider using XSLT files along with your XML files.
Remember:
XML is the data
XSLT is the template that will be used to PRESENT your data.
The xslt has a huge amount of functions including IF/Then/else logical checks and stuff..
PB
: This might not be the first place for this post but I was hoping somebody could help me with an XML question. I'm designing a set of functions that will parse out custom XML tags in an other-wise purely HTML file, and perform logic on them.
:
: One example that I'm trying to do is a way to use XML tags to perform conditional branching of the HTML in the form of if statements.
:
:
: <if condition="...">
: <p>Then display this</p>
: <else>
: <p>Dislpay this</p>
: </if>
:
:
: My question is - is that valid XML? It doesn't look right, since else contains a child element but doesn't have a closing tag. I was thinking this might be XML compliant, but it's uglier:
:
:
: <if condition="...">
: <if_true>
: <p>Then display this</p>
: </if_true>
: <if_false>
: <p>Otherwise display this</p>
: </if_false>
: </if>
:
:
: Anybody out there have input on what might be a good approach to this problem? Am I on the right track of is there an easier way? I'm open to suggestions. Thanks in advance.
:
: T
: