Couple of points (questions)
Unless your plugin can actually work out what fields are in MC then u should allow people to add aditional fields so they can add fields they've created in MC themselves.
Also - could this be extended to just allow us to use it for exporting to a text file where we can specify the delimiter?
What'd be GREAT would be if you could set it up to Export to SQL too
(just output each file as:
INSERT INTO [give us a table name input] (list all the field names seperated by comma's) VALUES (all field values - properly escaped);
)
ie. Make it an Output plugin rather than just an XML output.
Nila,
I think the most flexible way of approaching what you're talking about it to just use an XSLT to transform the MPL into any other "format". This is, after all, one of the prime "powers" of XML. Why "lock yourself" into a specific plugin format (other than XML!)?
I'm passingly familiar with SQL - but if you have an actual example (that works, of course), I'll write you an XSLT that converts the result of Scott.'s export to a text file.
The same idea applies to converting the MPL into a text delimited file - why do it in the plugin when you can just apply an XSLT that does it for you?
Scott.: Perhaps you'd consider adding a function to your plugin that lets the user apply an XSLT and save the resultant file as a text document. So there'd be two options: 1) Add an XSLT style-sheet reference to the export and open the XML in Explorer (which you've already done!) and 2) Choose an XSLT, transofrm the XML with it, and save the result as a text document.I don't imagine it'd be too hard to code the plugin to apply the transformation.... you can see how easy it was in JavaScript by looking at XAlbum.htm.
Scott-
P.S. You're plugin works great for me - though it's pointed out a problem I had with xsl:key's and empty fields. I also think I've made a mistake in the multi-level grouping when two different albums have the same name (but different artist, of course!)