Hi TheDiveO
> While I can perfectly understand the current architecture to chose the > deserializer based on the extension of the incoming file, this quickly hits a > dead end when it comes to generic file formats, such as XML/.xml, without a > cleary differentiating file extension. Of course, a quick workaround would be > to rename the import file. But the next time I or someone else importing an > updated XML file version ... so what file extension do I need to use? > > Also, over time I suspect that we may see more .xml files with different XML > schemas. > > Do you see a way to allow multiple XML deserializers, based on the root > element -- or maybe just based on the beginning of the XML file to be > imported? Kind of a mime-type detection, just on a XML file signature? Yes, I recognise the problems here. One solution would indeed be to have multiple deserializers registered to a file type and give each a chance to examine the incoming data, and if necessary prompt the user to choose the best one to use. If you don’t want to go down a rabbit hole of core modifications I’d suggest sticking with the custom file extension workaround for the moment. > Another question regarding XML parsing: are there any incrementally XML > parser libraries for JavaScript? Our would it be better to use the built-in > XML parser? I believe there are several incremental XML JS parsers; the xmldom.js parser that is used in a few of the core plugins however only works in “bulk” mode. Best wishes Jeremy > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/tiddlywikidev > <https://groups.google.com/group/tiddlywikidev>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywikidev/9827917b-3822-46dd-a6e4-399fa9845f75%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywikidev/9827917b-3822-46dd-a6e4-399fa9845f75%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/2E58EAF9-338B-4F9B-A1D5-272A24294761%40gmail.com. For more options, visit https://groups.google.com/d/optout.
