开发者

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

开发者 https://www.devze.com 2023-01-31 09:05 出处:网络
I use XML::TreeBuilder for creating and pa开发者_Python百科rsing of xml files. Is it possible to create element with CDATA using XML::TreeBuilder?

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

精彩评论

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