diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-06-04 16:03:56 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-06-04 16:03:56 +0100 |
| commit | 45e530dceda42282fae56b4c4f5fa7865f57899d (patch) | |
| tree | 685868f4bf78c64e851cbcdafd674e887bc782a5 /dotnet/Mammoth/Couscous/mammoth/internal/xml | |
| parent | b5a83b1cb96d410e325ff8b733d550295376d8c7 (diff) | |
Remove dotnet (use submodule from dotnet repo instead)
Diffstat (limited to 'dotnet/Mammoth/Couscous/mammoth/internal/xml')
| -rw-r--r-- | dotnet/Mammoth/Couscous/mammoth/internal/xml/parsing/SimpleSax.cs | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/dotnet/Mammoth/Couscous/mammoth/internal/xml/parsing/SimpleSax.cs b/dotnet/Mammoth/Couscous/mammoth/internal/xml/parsing/SimpleSax.cs deleted file mode 100644 index 65f63c3..0000000 --- a/dotnet/Mammoth/Couscous/mammoth/internal/xml/parsing/SimpleSax.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Mammoth.Couscous.java.io; -using Mammoth.Couscous.java.util; -using System.Xml; - -namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.xml.parsing { - internal static class SimpleSax { - internal static void parseStream(InputStream input, SimpleSaxHandler handler) { - var reader = XmlReader.Create(input.Stream); - while (reader.Read()) { - switch (reader.NodeType) { - case XmlNodeType.Element: - var name = new ElementName(reader.NamespaceURI, reader.LocalName); - var attributes = new HashMap<ElementName, string>(); - var isEmpty = reader.IsEmptyElement; - for (int attributeIndex = 0; attributeIndex < reader.AttributeCount; attributeIndex++) { - reader.MoveToAttribute(attributeIndex); - attributes.put(new ElementName(reader.NamespaceURI, reader.LocalName), reader.Value); - } - handler.startElement(name, attributes); - if (isEmpty) { - handler.endElement(); - } - break; - case XmlNodeType.CDATA: - case XmlNodeType.Text: - case XmlNodeType.SignificantWhitespace: - handler.characters(reader.Value); - break; - case XmlNodeType.EntityReference: - throw new System.NotImplementedException(); - case XmlNodeType.EndElement: - handler.endElement(); - break; - } - } - } - - internal static void parseString(string value, SimpleSaxHandler handler) { - throw new System.NotImplementedException(); - } - } -} |
