1

I am making a plugin. I have two QML files for the same layer and column. I want the plugin to combine the two existing files into a new QML file and then I will select which one symbol for each value I want.

The problem is, I don't know how to combine two QML files into new one. Any help?

2
  • Do you need to combine at all? If the net result is one file with one set of values. Perhaps you could provide some XML to show the two input QML files and the structure of the final XML file to show what you want to achieve.
    – nmtoken
    Commented Dec 17, 2016 at 15:23
  • As far as combining XML files go, you could look at: stackoverflow.com/questions/15921642/…
    – nmtoken
    Commented Dec 17, 2016 at 15:23

1 Answer 1

1

i'm not a programmer, but you can try to combine qml file with Notepad++ (or any text editor) because they are based on XML language. Idem for qlr and qgs extension.

2
  • I know I can do it manually but I want it to be automatic - it should be a function in plugin.
    – W. Tom
    Commented Jul 15, 2016 at 6:39
  • you could use some kind of xml library to copy nodes from one tree to the other. Standard Modul xml has ElementTree for example. Commented Jul 18, 2016 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.