You could use Notpad++ and use find/replace with wildcards, “.matches new line” 
enabled.
Replace ‘<qgis.*<renderer-v2’ with ‘<qgis>\n<renderer-v2’
and ‘</renderer-v2>.*</qgis>‘ with  ‘</renderer-v2>\n</qgis>‘.

With “replace in all opened documents” button it’s done in a few seconds.

(Just replace renderer-v2 with the xml-marker of whatever part of the qml you 
want to keep.)

Question is what you want to achieve with the modified qml. In fact, the 
current label style is replaced with “no labeling” by loading qml even if there 
is no label information in the qml.

Best regards
Benjamin


Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] Im Auftrag von Casper 
Bertelsen
Gesendet: Montag, 20. November 2017 05:55
An: qgis-user@lists.osgeo.org
Betreff: Re: [Qgis-user] QGIS Save style

Actually wrapping the style-part with <qgis> <\qgis> and removing the rest is 
enough to QGIS to registrer it as a style file

Mvh. / Best regards
Casper Bertelsen

Mail: casperb...@gmail.com<mailto:casperb...@gmail.com>
Tlf.: 28 56 06 41
On 19-11-2017 20:44, Lene Fischer wrote:

Thanks for your quick reply...

This gives me a lot of work :-(





-----Original Message-----

From: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of 
Matthias Kuhn

Sent: 19. november 2017 20:39

To: qgis-user@lists.osgeo.org<mailto:qgis-user@lists.osgeo.org>

Subject: Re: [Qgis-user] QGIS Save style



Hi Lene,



that's the way it is. It's been on my wishlist to have more control over what's 
saved for a while, but didn't happen so far.



You might try to manually edit the qml file and remove some definitions, but 
not sure it works either.



Regards



Matthias





On 11/19/2017 08:36 PM, Lene Fischer wrote:

Hi

Using QGIS 2.18.14 on Windows



I´m trying to save a categorized style (only style not labels ect) If

I save as default or QML file - the labels ect are saved too.



Any ideas ?

Regards

Lene Fischer

_______________________________________________

Qgis-user mailing list

Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user





_______________________________________________

Qgis-user mailing list

Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________

Qgis-user mailing list

Qgis-user@lists.osgeo.org<mailto:Qgis-user@lists.osgeo.org>

List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to