|
Patch for XML::Writer: msg#00072lang.perl.xml
Hi Ed, As of now, we cannot add a CDATA ( character data ) to an XML document using XML::Writer. I patched it in the following way and attached the same with this mail. diff -c -b -r old_xml_writer/ new_xml_writer/ > xml_writer.patch we can add a cdata in the following ways: ---------------------------------------- Ex 1: $writer->startTag("greeting"); # Insert CDATA "Hello, world" $writer->cData("Hello, world"); $writer->endTag("greeting"); Ex2: $writer->cdataElement("greeting", "Hello world"); Thanks Srinivas ________________________________________________________________________ Yahoo! India Mobile: Download the latest polyphonic ringtones. Go to http://in.mobile.yahoo.comOnly in old_xml_writer/: Makefile Only in old_xml_writer/: blib Only in old_xml_writer/: pm_to_blib diff -c -b -r old_xml_writer/test.pl new_xml_writer/test.pl *** old_xml_writer/test.pl Tue Dec 23 00:51:51 2003 --- new_xml_writer/test.pl Tue Dec 23 00:52:44 2003 *************** *** 556,562 **** $writer->cData("cdata testing - test44"); $writer->endTag("foo"); $writer->end(); ! checkResult(44, "<foo><![CDATA[ cdata testing - test44 ]]></foo>\n"); }; 1; --- 556,562 ---- $writer->cData("cdata testing - test44"); $writer->endTag("foo"); $writer->end(); ! checkResult(44, "<foo><![CDATA[cdata testing - test44]]></foo>\n"); }; 1; Only in new_xml_writer/: test.pl~
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | XML::LibXML, libxml-2.6.x and AxKit, Hansjoerg Pehofer |
|---|---|
| Next by Date: | Re: Patch for XML::Writer, srinithan |
| Previous by Thread: | XML::LibXML, libxml-2.6.x and AxKit, Hansjoerg Pehofer |
| Next by Thread: | Re: Patch for XML::Writer, srinithan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |