get { return prefix; }
}
- [MonoTODO]
public override char QuoteChar
{
- get { throw new NotImplementedException (); }
+ get {
+ // value string holds attribute quotation char.
+ if (NodeType == XmlNodeType.Attribute)
+ return value [0];
+ else
+ return '"';
+ }
}
public override ReadState ReadState
// If not started, then initialize attributeString when parsing is at start.
if(attributeStringCurrentPosition == 0)
- attributeString = value;
+ attributeString =
+ value.Substring (1, value.Length - 2);
bool returnEntity = false;
value = String.Empty;
{
this.reader = fragment;
can_seek = fragment != null && fragment.Peek () != -1;
+
+ if (fragType == XmlNodeType.Attribute)
+ value = "''";
/* for future use
switch(fragType)
{
SkipWhitespace ();
if (name == "xmlns")
- parserContext.NamespaceManager.AddNamespace (String.Empty, value);
+ parserContext.NamespaceManager.AddNamespace (String.Empty, ResolveAttributeValue (value));
else if (name.StartsWith ("xmlns:"))
- parserContext.NamespaceManager.AddNamespace (name.Substring (6), value);
+ parserContext.NamespaceManager.AddNamespace (name.Substring (6), ResolveAttributeValue (value));
AddAttribute (name, value);
} while (PeekChar () != '/' && PeekChar () != '>' && PeekChar () != -1);
// The reader is positioned on the quote character.
private string ReadAttribute ()
{
+ valueLength = 0;
+
int quoteChar = ReadChar ();
if (quoteChar != '\'' && quoteChar != '\"')
throw new XmlException ("an attribute value was not quoted");
- valueLength = 0;
+ // this keeps quote char to get QuoteChar property correctly.
+ AppendValueChar (quoteChar);
while (PeekChar () != quoteChar) {
int ch = ReadChar ();
}
ReadChar (); // quoteChar
+ AppendValueChar (quoteChar);
return CreateValueString ();
}
StringBuilder resolved = new StringBuilder();
int pos = 0;
+ // trim start/end edge of quotation character.
+ unresolved = unresolved.Substring (1, unresolved.Length - 2);
+
int next = unresolved.IndexOf ('&');
if(next < 0)
return unresolved;