Hi Rafael
The removeChild method of an MSXML object certainly works in ColdFusion -
here's an example of it in action in our XML content management system:
<cfobject action="create" class="MSXML2.DOMDocument" name="xmldoc">
<cfscript>
xmldoc.loadXML('#form.xml#');
root = xmldoc.documentElement;
todelete=xmldoc.selectSingleNode("article_xml/object[@id='#form.id#']");
deleteSuccess = root.removeChild(todelete);
</cfscript>
I'm confident that the insertbefore and replacechild methods will work too -
the only known problems with ColdFusion and MSXML appear when using CF5 and
the XSLStylesheet interface. Unfortunately MSXML doesn't return any useful
error messages to CFOBJECT (unlike other COM objects) so it's very difficult
to know what's going wrong.
If the little code snippet above doesn't help, perhaps you could show us
your code?
Tom
-----------------+
tom dyson
t: +44 (0)1608 811870
m: +44 (0)7958 752657
http://torchbox.com
> Any time I try to use any of the following dom methods: removechild,
> insertbefore, replacechild, I get the following error in Coldfusion 4.5:
>
> unknown exception condition
> unknown error while executing a tag.
>
> This happens whether I'm using torchbox's XML toolkit or SiteObjects'
> SO_XML tag, so I'm guessing it might be a parser issue.
>
> As a temporary workaround for removing nodes, I'm using the CF_XMLSubset
> tag with the bremovenodes option set to "yes". Incidentally, looking at the
> tag's code, it doesn't use the removechild method to remove nodes.
>
> I think someone else posted this error to the list before, but received no
> answer. Is there a known problem with these methods and some version of the
> msxml parser (under coldfusion)? How do I know which of the installed msxml
> parsers are the tags using? I recently installed msxml version 4.0 but have
> no idea if the tags are actually using it.
>
> Thanks in advance for any help.
>
> Rafael Torres
-----------------------+
cf-xml mailing list
list: [EMAIL PROTECTED]
admin: [EMAIL PROTECTED]
home: http://torchbox.com/xml