Commit 697d0bbe authored by Tibor Peluch's avatar Tibor Peluch
Browse files

added namespace check

parent 31a24ea2
......@@ -14,6 +14,7 @@ namespace Svg
internal class SvgElementFactory
{
private static List<ElementInfo> availableElements;
private const string svgNS = "http://www.w3.org/2000/svg";
/// <summary>
/// Gets a list of available types that can be used when creating an <see cref="SvgElement"/>.
......@@ -77,9 +78,12 @@ namespace Svg
{
SvgElement createdElement = null;
string elementName = reader.LocalName;
string elementNS = reader.NamespaceURI;
//Trace.TraceInformation("Begin CreateElement: {0}", elementName);
if (elementNS == svgNS)
{
if (elementName == "svg")
{
createdElement = (fragmentIsDocument) ? new T() : new SvgFragment();
......@@ -97,6 +101,7 @@ namespace Svg
{
SetAttributes(createdElement, reader, document);
}
}
//Trace.TraceInformation("End CreateElement");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment