SVG and DOM

Discuss SVG code, accessible via the XML Editor.
amirf
Posts: 1
Joined: Thu Feb 24, 2011 8:00 pm

SVG and DOM

Postby amirf » Fri Feb 25, 2011 1:27 am

Hi,

I've recently started using Inkscape for creation of document templates. The idea is to create a svg file (template) with Inkscape, update it in a .NET application and display it in a browser.

The problem is that the text elements in the updated file are dislpaced compared to the original svg file. I also tested to create an template in Inkscape (file1.svg), read it with XMLDocument (based on DOM) and save it to another file without any changes (file2.svg). When I open file2.svg in the Inkscape the text is displaced as well. However the other objects (rectangle, path) are on the right places.

The text is displaced also when I open the file in Microsoft Visio. On the other hand, nothing is displaced when I open the file with Firefox or Opera.

I suspect the problem lies in the value of the variable "xml:space" which is "preserve" but I'm not sure. I wonder if anybody know why this happens? What can be done to avoid it?

EricWarnke
Posts: 8
Joined: Fri Mar 25, 2011 5:23 pm

Re: SVG and DOM

Postby EricWarnke » Sat Mar 26, 2011 1:58 am

What happens if you save them as optimized or plain SVG files?


Return to “SVG / XML Code”