|
From: Niklas G. <ni...@pr...> - 2006-06-27 19:19:32
|
Hi guys, can you help Curia out with his improvement?
/niklas
---------- Forwarded message ----------
From: Curia Damiano <dam...@ke...>
Date: Jun 16, 2006 2:30 PM
Subject: SVG# improvement
To: ni...@pr...
Hello, I have an improvement to SVG#, to allow it to open the .svgz files.
In SvgDocument.doc,
/// <overloads>
/// Loads an XML document.Loads the specified XML
data.
/// <blockquote>
/// <b>Note</b> The Load method always preserves
significant white
/// space. The PreserveWhitespace property
determines whether or not
/// white space is preserved. The default is false,
whites space is
/// not preserved.
/// </blockquote>
/// </overloads>
/// <summary>
/// Loads the XML document from the specified URL.
/// </summary>
/// <param name="url">
/// URL for the file containing the XML document to
load.
/// </param>
public override void Load(
string url)
{
XmlTextReader reader;
if (!url.ToLower().EndsWith(".svgz"))
reader = new XmlTextReader(url);
else
reader = new XmlTextReader(new GZipInputStream(new
FileStream(new Uri(url).LocalPath, FileMode.Open)));
XmlValidatingReader vr = new XmlValidatingReader(reader);
prepareXmlResolver(vr);
LoadAndFire(vr);
reader.Close();
}
Obviously, at the beginning of the file you have to insert the following
line:
using ICSharpCode.SharpZipLib.GZip;
Thank you very much,
Curia Damiano
Damiano Curia
Key Technologies
dam...@ke...
voice +39029052204
fax +390291390322
www.keytech.it
--
-------
Niklas Gustavsson
http://www.protocol7.com
mailto:ni...@pr...
|