[Qgis-developer] [FeedBack] import a DB with QGIS styles table

Yves Jacolin (Free) yjacolin at free.fr
Thu Mar 6 00:58:14 PST 2014


Hi,

I would like to share a feedback on an issue on layer style in DB. 

One user wanted to migrate his database from pgsql 8.4 to pgsql 9.x. (the 
postgresql release is not important). He get some issue when importing the 
dump:

ERREUR:  invalid XML content
LINE 1: ...ion', 'communaute_communes54', 'the_geom', 'v40', '<!DOCTYPE...
                                                             ^
DETAIL:  line 1: StartTag: invalid element name
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>

Googling about this, it seems that we can't import a DB with qgis layer style 
easily when a column is of XML type with a doctype inside. Even if the xml is 
valid.

The correct way is to SET XML option to DOCUMENT this way:

SET XML OPTION DOCUMENT;

before the insert statement.

Hope it can help someone later!

Y.


More information about the Qgis-developer mailing list