Hi,
I am having fun with ns_xml, but I have a problem. I would like to
put my files to xml format. Its kinda easier that way, or more fun.
Following Ben Adida's stuff on QD I started to get my xml stuff to
work. Here is a sample snippet:
<?xml version="1.0"?>
<section image="/images/about.jpg" color="#67CC02" url="/about/">
<content>
<p>About Us</p>
</content>
</section>
Basically its a web page but as you can see the image and color for
the section is a xml attribute. I am successful in getting this
attributes and using it later on an ADP template. I am also
successful in getting the content. But it seem that
xml_node_get_content which is a wrapper to "ns_xml node getcontent
$node_id" trims away the XML tags inside the content. I end up with
"About Us" rather than my desired output of "<p>About
Us</p>". I think is the right behavior but not good for my needs.
What I need is to extract everything that is in the <content>
</content>. I did a ns_xml doc render, it was nice but I
renders the
whole document. I would like to have something that renders the node
and all children below it.
Please help. I can do a ns_xml doc render and just do a regexp, but
that would not be fun. Or makes the xml stuff useless. Maybe I just
create an ini style of a data or something else that is friendly to
regexp.
How can I extract everything between 2 xml tags? No regexp ok, I want
to do this the xml way. Thanks.