Can't cast Object type [XML] to a value of type [org.w3c.dom.element] using xml.elemNew

Description

It throws an error while using xml.elemNew(). but, Works fine with xmlElemNew() function.
https://docs.lucee.org/reference/objects/xml/elemnew.html

<cfscript> xml_document = XmlNew(); xml_root = xmlelemNew(xml_document,"notes"); xml_document.XmlRoot = xml_root; writeDump(xml_document); </cfscript> <cfscript> xml_document = XmlNew(); xml_root = xml_document.elemNew("notes"); xml_document.XmlRoot = xml_root; writeDump(xml_document); </cfscript>

Environment

None

relates to

Activity

Show:

Pothys - MitrahSoft 24 November 2021 at 15:05

I added a fix to this ticket

Pull Request: https://github.com/lucee/Lucee/pull/1475

Pothys - MitrahSoft 18 June 2020 at 13:09

I've added a test case for this ticket.

Pull request: https://github.com/lucee/Lucee/pull/966

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 18 June 2020 at 12:07
Updated 26 July 2022 at 06:03
Resolved 26 July 2022 at 06:03

Flag notifications