Submitted by jimspoon on 2020/12/08 17:44
I have a number of programs that store data in hierarchical XML or JSON type formats, and I'm wondering whether it would be possible to import this data into IQ, perhaps with user assignment of the XML elements to IQ fields.
 
For example, I have a bookmark program called Linkman.  It is very good but no longer actively developed.  I often think how I could do more with the data in IQ than I can in Linkman.  I can get the data into IQ but it's much more difficult than it should be.  The export to CSV or TSV is not easy and that does not preserve the hierarchy of the data either.  I examined the Linkman data file.  It is XML type even if it is not exactly completely XML compliant (there is no root element, for example).  But it is easy to see how the hierarchy of folders and bookmarks is achieved.  
 
Here's a typical folder element:
 
<node type=folder>
<tit>2020</tit>
...
</node>
 
Here's an example link element (nested within a folder element):
 
<node type=link>
<tit>FULL REVIEW (ROAD TEST): Xiaomi Yi 1080P Car WIFI DVR Dashcam (2.7" LCD &amp; 165?° Lens F/1.8) ?? ?? - YouTube</tit>
<des>FULL VIDEO REVIEW + 3x ON ROAD TEST VIDEOS UNBOXING review + How to Firmware update: https://www.youtube.com/watch?v=aWtFhRw3Tgw 1080P @ 30FPS, 1080P @ 60FPS...</des>
<key>Xiaomi,Xiaomi Yi,XiaoYi,Dashcam,Action Cam,GoPro,UHD Cam,1080p,?? ??,??,??,XIAOMI YI WIFI CAR DVR,WIFI DASHCAM</key>
<add>120916011615</add>
<mod>250519054025</mod>
<vis>120916011615</vis>
<che>120916011617</che>
<ipc>1</ipc>
</node>
 
IQ can already parse certain XML type files - OPML and OML.  I searched for an OML specification but couldn't find one.  The example in the IQ manual is an XML file exported from Ultra Recall.  The manual says that the import of the Ultra Recall data is limited to RTF content, item notes and attributes are not imported.
 
Perhaps at some point a generalized mechanism could be set up for importing this type of data (corresponding to the CSV import mechanism).  The user could specify the destination fields for the XML element data.  Nested elements would become child items.
 
I imagine that such a mechanism could be useful for importing other XML / JSON data.