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.
精彩评论