msxml2 parsing svg
-
I'm trying to open my .svg files and set the
height
andwidth
attributes to 100% so that my graphics appear correctly on my web pages as recommended here http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Web-SVG-Positioning.html[^]. Having looked around the net at many possible solutions to them not floating and sometimes appearing with scroll bars this appeared to be the one to go for. So having written some C++ using MSXML2 from a VS2008 C++ on windows8 (usingmsxml6.h
) to change these attributes in all my svg files I find it works on some (inkscape) and not others (graphviz dot). The returned reason, is:
Could not load file, Reason: Parameter entity must be defined before it is used. Source String: %svg-prefw-redecl.mod;]]>
Reports of MSXML not handling this are all over the net, the problem code seems to be in in http://www.w3.org/2000/svg[^] for example:
- can anyone recommend a way to proceed?
-
I'm trying to open my .svg files and set the
height
andwidth
attributes to 100% so that my graphics appear correctly on my web pages as recommended here http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Web-SVG-Positioning.html[^]. Having looked around the net at many possible solutions to them not floating and sometimes appearing with scroll bars this appeared to be the one to go for. So having written some C++ using MSXML2 from a VS2008 C++ on windows8 (usingmsxml6.h
) to change these attributes in all my svg files I find it works on some (inkscape) and not others (graphviz dot). The returned reason, is:
Could not load file, Reason: Parameter entity must be defined before it is used. Source String: %svg-prefw-redecl.mod;]]>
Reports of MSXML not handling this are all over the net, the problem code seems to be in in http://www.w3.org/2000/svg[^] for example:
- can anyone recommend a way to proceed?
-
I've run into similar scenarios in my project; converting .svg "coordinates" into valid .xml content ... have you tried just lopping off the header and bolting on the standard .xml document preamble?
Hi, Re bolting on standard XML preamble: I've now started using the Inkscape XML editor to open and save my GraphViz Dot .svg files, doing this way is time consuming but at least this brings some consistency. It also removes the need to use a program to edit the
width
andheight
which was what was failing. I'm now getting all my .svg files displaying nicely in IE10, no scroll bars, and when the my IE10 window gets too narrow they shrink to fit: http://www.jgdprojects.co.uk/ModelUse.htm[^] But in IE8 mode neither ,svg or ,png are currently appearing, just white spaces... -
Hi, Re bolting on standard XML preamble: I've now started using the Inkscape XML editor to open and save my GraphViz Dot .svg files, doing this way is time consuming but at least this brings some consistency. It also removes the need to use a program to edit the
width
andheight
which was what was failing. I'm now getting all my .svg files displaying nicely in IE10, no scroll bars, and when the my IE10 window gets too narrow they shrink to fit: http://www.jgdprojects.co.uk/ModelUse.htm[^] But in IE8 mode neither ,svg or ,png are currently appearing, just white spaces...Good morning, Are you sure that it's just blank? Or does a right-click context menu provide you with several options. Options such as "zoom-in", "zoom-out", "Save svg as", etc? As you say, and as I belabored the post with programming lingo, doing the same on a .png (or a .jpg for that matter) will/should show "save-as" but there's no scalar operation. Off the subject, but on CP (codeproject), I'm using IE8 now and as far as I know without free svg-viewer plugins (although several Adobe apps are installed), do you have troubbles signing-in to the site? This Alt+mouse-click behavior required to get my name and password on the control lines is driving me to stow my harpoon!
-
Good morning, Are you sure that it's just blank? Or does a right-click context menu provide you with several options. Options such as "zoom-in", "zoom-out", "Save svg as", etc? As you say, and as I belabored the post with programming lingo, doing the same on a .png (or a .jpg for that matter) will/should show "save-as" but there's no scalar operation. Off the subject, but on CP (codeproject), I'm using IE8 now and as far as I know without free svg-viewer plugins (although several Adobe apps are installed), do you have troubbles signing-in to the site? This Alt+mouse-click behavior required to get my name and password on the control lines is driving me to stow my harpoon!
Definitely blank. I've used Fiddler as recommended to me in my last svg query (below this one) and I can see that using IE10 in IE8 mode, the server is sending .svg and .png (as expected) and the browser is displaying the .svg. However using IE10 in IE8 mode Fiddler shows only the .svg being sent when I expected the .png. I'm going to setup an XP PC with Windows 8 to see what really happens with IE8. I've not noticed any problems signing in.
-
Definitely blank. I've used Fiddler as recommended to me in my last svg query (below this one) and I can see that using IE10 in IE8 mode, the server is sending .svg and .png (as expected) and the browser is displaying the .svg. However using IE10 in IE8 mode Fiddler shows only the .svg being sent when I expected the .png. I'm going to setup an XP PC with Windows 8 to see what really happens with IE8. I've not noticed any problems signing in.
I wonder ... I use Dreamweaver for a lot of xml/html/http(sleuthing/etc)/css. And recently have signed on to style sheets as programming commitment (that is, to be studied at some point in time) and JUST discovered the F12 key which in IE8 brings up this whole Developer Tools scenario. Might F12 and the four tabs of this interface give you a leg up on some scripting function or method that is being allayed when it comes time to see client side content? This migght actually name a script from whichh the detective work might take a better direction. I've looked up Fiddler but haven't downloaded it. And as far as website entities, have only dealt with the lack of ability to do any real programming with ASP.NET (or SQL Server as result) due to basic cost limmitation. Thinking about springing though. :)