XML和PHP问题?
<?xml version="1.0" encoding="GB2312" ?>
<root text="ROOT" >
<menu id="1" text="AAA">
<menu id="12" href="" text="AA"></menu>
<menu id="13" href="" text="BB"></menu>
<menu id="14" href="" text="CC"></menu>
</menu>
<menu id="2" text="BBB">
<menu id="21" href="" text="AA"></menu>
<menu id="22" href="" text="BB"></menu>
<menu id="23" href="" text="CC"></menu>
</menu>
</root>
以上是一个.XML文件.我想把上面的AAA和BBB用PHP的变量替换,然后输出一棵树.
可以在XML文件里可以写PHP吗?如果可以怎么写啊.如果不可以要用什么方法来实现啊??
谢谢各位大大~!