Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

DOMParser & XML

1457329267
James W.
Sheet Author
API Scripter
So, I understand that since the API scripts aren't running in a browser, which means no DOM object for the environment and all that, but why don't we have access to DOMParser and XML objects?  I sat down this evening to start working on a script to import characters from Hero Lab to the PF character sheet via XML, but I quickly found that in order to do that, I have to reinvent the bloody wheel. Any chance we could get access to basic XML parsing?  There is so  much data in those HL XML files that I could fill out the entire sheet, complete with full details on all of a character's spells, but I just don't have the patience to do it the hard way.
There are xml to json converters out there.
1457366819
James W.
Sheet Author
API Scripter
Yes, but ignoring the "French -> German -> English" analogy... The fact that I can't include libraries means I'd have to include the entire converter in the same file. There are legal issues with using someone else's code (usually not an issue here, since the forum rules state posting code here allows others to use it). JavaScript XML->JSON converters tend to rely on the DOMParser object, so I couldn't really use them here, anyways. I really, really don't want to do any pre-processing outside of Roll20; it wouldn't be a problem for me to do, but it'd certainly make it another barrier for others to use it. Using an external converter would get me data I could use in Roll20, but it's a pretty poor work-around that shouldn't be needed in the first place.
1550175469
Roll20 Dev Team
Pro
Marketplace Creator
Thanks for the suggestion! After 30 days, Suggestions and Ideas with fewer than 10 votes are closed and the votes are refunded to promote freshness. Your suggestion didn't build the right momentum this time, but feel free to submit it again! We find that the best suggestions describe the problem you are having, and the solution you want. You can learn more about the process of making suggestions on the Roll20 Wiki! More details can be found here .