[Zope] XMLDocument Question
Yves-Eric Martin
yemartin@garage.co.jp
Fri, 04 Feb 2000 14:52:11 +0900
On Fri, 04 Feb 2000 00:03:00 -0500
"James W. Howe" <jwh@allencreek.com> wrote:
> <faq>
> <entry>
> <question><p>To be or not to be?</p></question>
> <answer><p>That is the question</p></answer>
> </entry>
> </faq>
>
[...]
> So, in the case above, I would want to get back the value:
>
> <p>To be or not to be?</p>
Try the following:
<faq>
<entry>
<question><![CDATA[<p>To be or not to be?</p>]]></question>
<answer><![CDATA[<p>That is the question</p>]]></answer>
</entry>
</faq>
The <![CDATA[ ... ]]> notation instructs the XML parser to treat
everything within as pure data (that is to say not to parse it). So
in this case:
<dtml-var "text_content('question')">
would return: <p>To be or not to be?</p>
--
Yves-Eric Martin
Digital Garage Inc.
yemartin@garage.co.jp