if (current == null)
return String.Empty;
- return current.Prefix;
+ if (current.NodeType == XmlNodeType.Attribute)
+ return current.Prefix != String.Empty ? current.Prefix : null;
+ else
+ return current.Prefix;
}
}
return null;
}
+ internal XmlParserContext GetInternalParserContext ()
+ {
+ if (entityReader != null)
+ return entityReader.GetInternalParserContext ();
+ else
+ return new XmlParserContext (document.NameTable,
+ current.ConstructNamespaceManager (),
+ document.DocumentType != null ? document.DocumentType.DTD : null,
+ current.BaseURI, XmlLang, XmlSpace, Encoding.Unicode);
+ }
+
public override string LookupNamespace (string prefix)
{
if (entityReader != null && entityReader.ReadState != ReadState.Initial)
}
if (current.NodeType == XmlNodeType.Attribute) {
+ if (current.FirstChild == null)
+ return false;
current = current.FirstChild;
- return current != null;
+ return true;
} else if (current.ParentNode.NodeType == XmlNodeType.Attribute) {
if (current.NextSibling == null)
return false;
return false;
}
+#if NET_1_0
// Its traversal behavior is almost same as Read().
public override string ReadInnerXml ()
{
return String.Empty;
}
}
+#endif
public override string ReadString ()
{
if (ctx == null) {
ctx = new XmlParserContext (document.NameTable,
current.ConstructNamespaceManager (),
- document.DocumentType.DTD,
+ document.DocumentType != null ? document.DocumentType.DTD : null,
BaseURI, XmlLang, XmlSpace, Encoding.Unicode);
}
entityReader = new XmlTextReader (replacementText, xmlReaderNodeType, ctx);
+ entityReader.XmlResolver = document.Resolver;
+ entityReader.MaybeTextDecl = true;
}
public override void Skip ()