|
From: Curia D. <dam...@ke...> - 2006-06-28 08:59:25
|
Hello! My modify is complete (I think), and is ok for me.
You could only help me in committing the code so that is already present =
in
future releases.
Best regards, Curia Damiano
=20
=20
_____ =20
Da: pro...@gm... [mailto:pro...@gm...] Per conto di Niklas
Gustavsson
Inviato: marted=EC 27 giugno 2006 21.19
A: svg...@li...
Cc: dam...@ke...
Oggetto: Fwd: SVG# improvement
=20
Hi guys, can you help Curia out with his improvement?
/niklas
---------- Forwarded message ----------
From: Curia Damiano < dam...@ke...
<mailto: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,=20
=20
/// <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=3D"url">
/// URL for the file containing the XML document =
to
load.
/// </param>
public override void Load(
string url)
{
XmlTextReader reader;
=20
if (!url.ToLower().EndsWith(".svgz"))
reader =3D new XmlTextReader(url);
else
reader =3D new XmlTextReader(new GZipInputStream(new
FileStream(new Uri(url).LocalPath, FileMode.Open)));
=20
XmlValidatingReader vr =3D new XmlValidatingReader(reader);
prepareXmlResolver(vr);
LoadAndFire(vr);
reader.Close();
}
=20
Obviously, at the beginning of the file you have to insert the following
line:
using ICSharpCode.SharpZipLib.GZip;
=20
Thank you very much,
Curia Damiano
=20
=20
=20
Damiano Curia
Key Technologies
<mailto:dam...@ke...> dam...@ke...
voice +39029052204
fax +390291390322
www.keytech.it
=20
=20
=20
=20
=20
--=20
-------
Niklas Gustavsson
http://www.protocol7.com
mailto:ni...@pr...=20
|