Re: Deleting a node from XML document
> Hi All, > > Can anyone please help me on finding out how to delete an element with > element id courses.specialization2 in the following XML structure? > > > > > > > > > specialization.specialization_name > > > Specialization Name: > > > required field > > > > > > > > > courses.specialization1 > > > Specialization1: > > > required field. > > > > > courses.specialization2 > > > Specialization1: > > > required field. > > > > > > > > Thanks You can also use XSLT to get this done as well. Here is a link to another board that gives a pretty good explanation of how to remove nodes from an XML document: http://bytes.com/groups/xml/638356-xsl-how-remove-nodes-xml-tree-advanced --JW ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324760 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Deleting a node from XML document
Using betterXml (http://betterxml.riaforge.org/), I would do something like this: xmlFile = CreateObject('component', 'BetterXML_Editor').init( myXmlFileUrlOrString ); xmlFile.Delete('//element[element_id = "courses.specialization2"]); xmlFile.Write(myFile); // or something else HTH Dominic 2009/7/20 fun and learning : > > Hi All, > > Can anyone please help me on finding out how to delete an element with > element id courses.specialization2 in the following XML structure? > > > > > > > > > specialization.specialization_name > > > Specialization Name: > > > required field > > > > > > > > > courses.specialization1 > > > Specialization1: > > > required field. > > > > > courses.specialization2 > > > Specialization1: > > > required field. > > > > > > > > Thanks > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Deleting a node from XML document
Hi All, Can anyone please help me on finding out how to delete an element with element id courses.specialization2 in the following XML structure? specialization.specialization_name Specialization Name: required field courses.specialization1 Specialization1: required field. courses.specialization2 Specialization1: required field. Thanks ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4