Import xml

Hello,

I would like to import Vault3 notes. Vault3 allows to export notes as XML files.

The content of a very small example of such XML file with only two notes is the following (the two notes are called test1 and test2):

<?xml version="1.0" encoding="utf-8"?><Vault version="1.2" base64Encoded="true"><Item><Title>VGVzdDE=</Title><Text>dGVzdDE=</Text><Item><Title>dGVzdDI=</Title><Text>dGVzdDI=</Text></Item></Item></Vault>

For me it seems strange that this file contains neither the wording of title and content of the first note (test1 and test1) nor of the second note (test2 and test2). Anyway, hoping this is not a problem, my question is: which is the proper way, if any, to import such XML files into Joplin?

I have not yet installed Joplin, so do not know the version. First would like to know if importation is possible. However I researched a lot because have lots of notes, use them for work, and this is an important issue for me. Joplin is compatible with Linux, android and nextcloud, allows markdown, tags and even already has some geolocalization implemented. So it seems by far the best available.

Operative systems are Debian 10 and Android 9

Thanks

Hello francus, and welcome to the community!

Joplin does not directly support your use-case, I'm afraid: as far as third-party services go, only Evernote's ENEX files are supported.

That being said though, it will also let you import a directory full of Markdown files. So you could take that exported XML and spit out MD files, then import them.

Alternatively, you could also use the Joplin Web Clipper's API to import them directly - that would require more programming, though.

Does any of that help? I know it's not exactly drag-and-drop, but as far as I'm concerned, Joplin is worth the entry cost. :stuck_out_tongue:

I understand that means having many hundreds up to a thousand of notes without any hierarchical connection among them. If I am correct no way to be able to manually restore the original order without errors nor to find time and patience to do that.

Anybody able to do that for money? My notes are only text, no photos, no attachments, no tags. Just text with a title section and a content section.

Many thanks to @zblesk for the help and the welcome

What do you base that on? I don't think that's true.

While yes, the export structure is flat, the note format does contain some metadata. I haven't ever used this option, but now did a quick check for you. Here is what the structure looks like, exported from Joplin:

image

So - yes, flat. (The Resources folder contains images and the like.)

After importing it into Joplin:
image

So the hierarchy got preserved.
Dunno, the note format seems annoying to output, but it should work.

I might be able to, if the above doesn't seem more practical.

Ok let's do it. I tried the first option, but also extracting MD files from XML seems complicated. You certainly have much more experience and will be able to avoid loosing notes.

Please let me know how to send the xml files to you. Vault 3 produces 21 separate xml files. But using Jopling it may be more convenient to have everything together. Then you may send me an estimate of the cost.

Thanks

Try sending it in a DM, then.

@francus

I hope @zblesk is able to help you.

I thought I would just let you know that the text you mentioned IS in the test export you showed above.

Note that the line contains:

base64Encoded="true"

So it seems that your export has encoded the titles and text in Base64

Base64 Text
VGVzdDE= Test1
dGVzdDE= test1
dGVzdDI= test2

wow!

shouldn’t be too comlicated in python which comes with xml parsers …
I am thinking about his for ScribblePapers … but don’t have the time right now …

I tried to test Joplin and to convert XML file to MD using Pandoc which produces a single MD file, not a folder full of MD files. Importing this MD file gives a note with a page full of meaningless caracters.

Also @zblesk showed that Joplin is able to respect the hierarchical structure, but then reading this thread Notes hierarchy?
I became confused. In fact it seems that a true note hierarchical multilevel structure is more a debated request that an actual feature. See also issue 122 https://github.com/laurent22/joplin/issues/122

My notes are arranged in a 3, 4, 5 or more levels of notes, while Joplin seems to use a complex mixture of notebooks and notes to create a multilevel structure.

For me this means that until Joplin can have a multilevel structure of just notes, it will be impossible to import my structure without major manual rewriting. So perhaps it is better to wait until that moment. But of course I may be totally wrong.

Finally, trying to play with Android Joplin I’m unable to create any hierarchical structure. Notes are stored into notebooks, but I am not getting how to make a notebook dependent from another one.

Thanks again for the attention

Can you please elaborate?

A note is a file. One item. So how do you have a multilevel note? What is a multilevel note?

As with most hierarchical structures (like a Linux filesystem) you have folders and files. Folders can contain files and other folders. Files don't contain anything but text and references.

What does that mean? Do you want to create a sub folder or place a folder in another folder?

This is currently not possible on mobile. There was a PR that addressed this, but it was abandoned. Current workaround people use is to create the folder/notebook structure in the desktop app and sync it to mobile.

I am trying to import a Vault3 note structure, where the whole structure is a single file. In a vault3 file, a note works at the same time as a text container and as a parent folder for other notes that may be dependent, as sons of it. Then each son note may be the parent of her own son notes, cascading for as many levels as you want. So each note has a double function, as text container and as structure organizer. This is how the vault3 single file structure works.

From your words it seems that Joplin creates a file for each note and a folder for each notebook. So the organization is totally different. That is why it seems so difficult to import it.

The following screenshot is the typical screen of Vault3 with the notes working as a text container (if you click on the note title) or as parents (if you click on the arrow on the left). To create a sub note you long click on the relevant note and then you indent the newly created note under the parent on which you long clicked.

how to make a notebook dependent from another one.

Both cases are interesting, but the first one is more important. I work on notes on mobile and the ability to create a structure is important. Otherwise how you avoid creating a mess of notes all together in the same place. You need to go promptly to desktop to make order before forgetting what the notes were about.

Perhaps it is possible to integrate the two systems. Vault3 is open source, so code can be copied. Therefore when you create a new note under Jopling you can choose if you want to create a standard note file or a Vault3 container structure file that allows to nest a structure of hierarchical notes even on mobile.

I suggest you ask the Vault3 guys to provide a proper export function. Joplin is a note taking app that uses markdown. This is the core of the application. You don’t ask your car dealer to convert your car to a boat, do you?

Either way, both apps provide the same functionality when it comes to hierarchy. At least it is very close. You can’t expect 2 different apps to work exactly the same - that is when they use different storage formats, which they do.

With regards to creating subfolders and moving folders on mobile, I’d like to think that it will make it into Joplin at one point.

I see.
I think the main issue is francus’ workflow depends on features Joplin does not have. Nesting notes directly one under another (to group/categorize them) is something I don’t really expect in Joplin any time soon. (I might be wrong tho, don’t take my word for it.)

Anyway many thanks. I appreciate this is a very nice and active community willing to help and share ideas. This is wonderful. I will try to keep an eye on issue 122 . If in the future there will be some development I’ll reappear. After all I do not think that integrating Vault3 with Joplin is such a strange idea as pretending to transform a car into a boat. It is leaving Joplin as it is, but adding the option (perhaps by a plugin or other option) to create note files that can be opened calling Vault3, adding the additional functionality of being able to categorize notes even on a mobile + added flexibility.

After all issue 122 is open and some people contributed to it because this need is felt. But of course there may be many other ways to be able to categorize notes on mobile.

Best

Just to clarify a few things:

Issue 122 has been closed for over a year. I’m not sure what gave you the impression that it is an open issue.

Joplin allows to import 3 sorts of files: Text, Markdown, and Enex.

We can’t implement hundred different import processes and support them. This would be an extreme overkill for this project.

If there is a Vault3 specification, it must be possible to create the proper md directory structure to import the files as directories and notes (or use the Joplin API). Personally I don’t know how popular Vault3 is and how many people are using it. But this is a big community. Who says that this won’t be implemented by someone who really needs it. A lot of people provided scripts and other tools in the #apps category.

Well @tessus thanks! You are certainly right, even if I was not suggesting an importation facility, rather a way to be able to organize notes on mobile too.

But the same it may be that some early day Joplin mobile will be able to add notebook-directories and therefore have organizing capabilities. Since the desktop version is able to do this there is nothing that prevents to have this on mobile.

Or do you thing that even this is unlikely?

It might happen some day. For information, the mobile app is best seen as an advanced viewer for now - personally I want my notes on it and being able to change and create new ones, but I'm fine with doing the organisation on desktop.

It's true that more and more people use their mobile devices and tablets to do everything though, so it's likely we'll see more organisational features on the mobile app over time.

Thanks for replying @laurent . I much prefer using the computer than the phone at home, but when I am out there is simply no way. Since it seems that after some effort we have found a solution we can agree with, does it make sense to put a bounty to speed it up? If yes, how much would it be, considering that it should include the importation of my notes that @zblesk seemed to suggest as possible using Joplin API?

Importing the xml notes and organising the notebooks from the mobile app are two different issues I believe.

We don’t have anything for bounties at the moment but if you have some suggestions on what we could use, please let us know. Even better if you or someone else could set it up.