# It is possble to use external libraries (CDN) in HTML

**URL:** <https://discourse.nodered.org/t/it-is-possble-to-use-external-libraries-cdn-in-html/68002>\
**Category:** Developing Nodes\
**Created:** [21 September 2022 01:52 UTC](https://discourse.nodered.org/t/it-is-possble-to-use-external-libraries-cdn-in-html/68002 "2022-09-21T01:52:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sangwoo](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@sangwoo](https://discourse.nodered.org/u/sangwoo)\
**Post date:** [21 September 2022 01:52 UTC](https://discourse.nodered.org/t/it-is-possble-to-use-external-libraries-cdn-in-html/68002/1 "2022-09-21T01:52:33Z")

</div>

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](https://www.npmjs.com/package/fast-xml-parser)  
[fast-xml-parser (cdn)](https://cdnjs.com/libraries/fast-xml-parser)

I try to use this library using cdn like this,

```auto
<script
  src="https://cdnjs.cloudflare.com/ajax/libs/fast-xml-parser/4.0.10/fxparser.js"
></script>

```

but I can't use it...

It is possble to use external libraries (CDN) in HTML?  
If so, how can I use external libraries in HTML?

Thanks for reading.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 September 2022 09:17 UTC](https://discourse.nodered.org/t/it-is-possble-to-use-external-libraries-cdn-in-html/68002/2 "2022-09-21T09:17:54Z")

</div>

> [@sangwoo](#):
>
> It is possble to use external libraries (CDN) in HTML?

Yes.

> [@sangwoo](#):
>
> If so, how can I use external libraries in HTML?

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 October 2022 09:18 UTC](https://discourse.nodered.org/t/it-is-possble-to-use-external-libraries-cdn-in-html/68002/3 "2022-10-05T09:18:16Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
