I'm currently creating a custom node.
And, I need to use xml parsing library in HTML.
I will use the library below. fast-xml-parser fast-xml-parser (cdn)
As you have done - though it would be helpful if you shared the surrounding HTML context so that we can check whether it is correct.
1st thing to check is in the dev tools in your browser to see if node-red actually loaded that library.
If it did, then it implies that you need to look again at how to use the library.
BTW, using a CDN for a custom node is OK for testing but a bit of an anti-pattern for deployment since not all devices will have access to the Internet when running. At the least, you should make it clear in your README that the node has a dependency on the Internet.