Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ ImportXML and <include>
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Twisol
USA (2,257 posts) Bio
|
| Date
| Tue 09 Feb 2010 09:10 AM (UTC) |
| Message
| I find myself wanting to use ImportXML() with an <include> tag in the passed text, to include a nominated XML file from script. I'm unable to place the <include> tag directly into the parent file because I want to be able to dynamically load an XML file sometime during runtime. However, due to the implementation of ImportXML, it ignores <include> tags if the passed content does not have an associated filename (that is, if it's from the clipboard or a scripted string).
I also can't use the io.* methods to open the file and pass the contents in that way, because (1) the io.* functions are disabled if the world/plugin isn't trusted, and (2) <include> tags within THAT content won't be processed either, due to the same issue.
According to a comment within ImportXML's source, it behaves this way so that XML imported from the ImportXMLDlg wouldn't cause the <include> tags to be evaluated. I suppose it's a valid concern, although IMO if someone wants to import an <include>, more power to them.
If possible, it would be nice to fix ImportXML itself. Given that you might not not want to change its behavior, though, would it be possible to add a new scripting function to fill the gap? |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
4,956 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top