# Cannot upload or create .xml file into editor.p5js

**URL:** <https://discourse.processing.org/t/cannot-upload-or-create-xml-file-into-editor-p5js/27394>\
**Category:** p5.js\
**Created:** [January 26, 2021, 8:55pm UTC](https://discourse.processing.org/t/cannot-upload-or-create-xml-file-into-editor-p5js/27394 "2021-01-26T20:55:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.processing.org/u/Laurent)\
**Post date:** [January 26, 2021, 8:55pm UTC](https://discourse.processing.org/t/cannot-upload-or-create-xml-file-into-editor-p5js/27394/1 "2021-01-26T20:55:53Z")

</div>

Hi everyone,

Teaching the different data file format, I need to upload a .csv, .json and .xml file into p5.js web editor. Doing this, the editor gives an error message (after upload trial) : ‘You can’t upload files of this type’. When trying to create an empty .xml file, the editor says: ‘Invalid file type. Valid extensions are .js, .css, .json, .txt, .csv, .tsv, .frag, and .vert.’ So it’s impossible to work with .xml files…

I don’t see any reason to forbid adding .xml file to an online Processing project. Even more when p5.js librariy provides a loadXML() function and resources in order to process .xml data. Is it a bug or am I doing something wrong?

Thanks a lot for your attention and help!

Laurent

---

<div class="post-metadata">

**Author:** ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)\
**Post date:** [January 26, 2021, 9:43pm UTC](https://discourse.processing.org/t/cannot-upload-or-create-xml-file-into-editor-p5js/27394/2 "2021-01-26T21:43:03Z")

</div>

Hello @Laurent

It is neither a bug nor are you doing something wrong. It’s [by design](https://github.com/processing/p5.js-web-editor/blob/a9a53f26a5dbb745fe6ec9f89a91703b4c7c23e5/server/utils/fileUtils.js#L29), like it or not. 😊 Hopefully, someone will get back to you on the issue you created at the [GitHub repository](https://github.com/processing/p5.js-web-editor/issues/1741) the other day.

If the project maintainers don’t want to add support for `.xml` files, you could always run p5.js locally for yourself. Or try another online editor, like [OpenProcessing](https://www.openprocessing.org) (I don’t know if it supports it, though).

---

<div class="post-metadata">

**Author:** ![Laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@Laurent](https://discourse.processing.org/u/Laurent)\
**Post date:** [January 26, 2021, 11:39pm UTC](https://discourse.processing.org/t/cannot-upload-or-create-xml-file-into-editor-p5js/27394/3 "2021-01-26T23:39:01Z")

</div>

Hello @Sven. Thanks for your lights about this question 😃. I hope a solution could be found in the close future, 'would be great. 'cause p5.js online editor is really a great tool for education. It helps when you have to give remote lessons during this difficult period. Asking young students to install Processing on their computer is always hazardous, with some of them telling you they have technical issues you cannot solve easily remotely. With p5.js online editor, students just need browser and everything works.

I just wonder why developpers have ‘prohibited’ to upload or create .xml files in online sketches. Forgotten to put .xml extension into authorized files type list? I just hope this is not for security reason.

By the way, as you mentioned it, I’ve opened an issue about this problem on Github. For those who are interested, here is the link:

> <https://github.com/processing/p5.js-web-editor/issues/1741>
>
> Hi everyone,
> Teaching the different data file format, I need to upload a .csv, .json and .xml file into p5.js web editor....

Thanks again for answer and by the way thanks to all folks developping Processing, a really great tool to learn programming and going further with lot of fun!

Laurent
