开发者

How to create using XML::TreeBuilder element with CDATA?

I use XML::TreeBuilder for creating and pa开发者_Python百科rsing of xml files.

Is it possible to create element with CDATA using XML::TreeBuilder?

<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
  {
  return 1;
  }
else
  {
  return 0;
  }
}
]]>
</script>


XML::TreeBuilder uses XML::Parser to read and parse XML and creates a bunch of XML::Elements. If you want to then manipulate the XML by creating new tags and so on, you probably want to use XML::DOM or XML::Generator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜