How to import opml/xml/html data?
Posted: Thu Dec 07, 2023 5:24 pm
Hello,
I hope it is possible to import such data even if it does not yet have the form MIA requires? I can do some scripting in order to get there, but would need to know exactly what MIA expects; I have installed the current .opml import add-in from your link.
My source program exports to .xml (not .opml), with some fields for each record, notably ID, title and comment; the tree structure can be retrieved from the respective indentation levels (number of tabs in front of the data) of the items in there, so I can write an .opml file, fetch the data from the three fields, put them in any order / form which expected, and add a fourth field into the .opml, then containing the indentation level number, I just need to know the exact structure of the .opml file from which then MIA can import.
As for the content (formatted text, sometimes pics) of the items, my source program exports these contents as .html files, every one of which in its own folder, which is named after the ID number of the respective item; if the item has no content, that folder and .html file in it will not be created since then, all the necessary info for the item to be created is already in the item data in the .xml file.
Thus, my script would check if for every item ID, there is a respective folder for the respective .html data, and if there is, it would copy the .html data into the .opml file, there into some dedicated "content" field.
So, my script will automate the writing of the necessary .opml file, but first, I would need the exact syntax and field denominations expected in that .opml file:
- header of the file
- for every item: header, title field, indentation level field, comment field, content field, footer, and in case expected order of these fields (it seems my IDs are only necessary for the processing within my script, and not needed then any further)
- footer of the file
Thank you very much!
I hope it is possible to import such data even if it does not yet have the form MIA requires? I can do some scripting in order to get there, but would need to know exactly what MIA expects; I have installed the current .opml import add-in from your link.
My source program exports to .xml (not .opml), with some fields for each record, notably ID, title and comment; the tree structure can be retrieved from the respective indentation levels (number of tabs in front of the data) of the items in there, so I can write an .opml file, fetch the data from the three fields, put them in any order / form which expected, and add a fourth field into the .opml, then containing the indentation level number, I just need to know the exact structure of the .opml file from which then MIA can import.
As for the content (formatted text, sometimes pics) of the items, my source program exports these contents as .html files, every one of which in its own folder, which is named after the ID number of the respective item; if the item has no content, that folder and .html file in it will not be created since then, all the necessary info for the item to be created is already in the item data in the .xml file.
Thus, my script would check if for every item ID, there is a respective folder for the respective .html data, and if there is, it would copy the .html data into the .opml file, there into some dedicated "content" field.
So, my script will automate the writing of the necessary .opml file, but first, I would need the exact syntax and field denominations expected in that .opml file:
- header of the file
- for every item: header, title field, indentation level field, comment field, content field, footer, and in case expected order of these fields (it seems my IDs are only necessary for the processing within my script, and not needed then any further)
- footer of the file
Thank you very much!