GetRemainder() public method

public GetRemainder ( ) : TextReader
return TextReader
Exemplo n.º 1
0
		private void ResolveExternalEntityReplacementText (DTDEntityBase decl)
		{
			if (decl.SystemId != null && decl.SystemId.Length > 0) {
				// FIXME: not always it should be read in Element context
				XmlTextReader xtr = new XmlTextReader (decl.LiteralEntityValue, XmlNodeType.Element, null);
				xtr.SkipTextDeclaration ();
				if (decl is DTDEntityDeclaration && DTD.EntityDecls [decl.Name] == null) {
					// GE - also checked as valid contents
					StringBuilder sb = new StringBuilder ();
					xtr.Normalization = this.Normalization;
					xtr.Read ();
					while (!xtr.EOF)
						sb.Append (xtr.ReadOuterXml ());
					decl.ReplacementText = sb.ToString ();
				}
				else
					// PE
					decl.ReplacementText = xtr.GetRemainder ().ReadToEnd ();
			}
			else
				decl.ReplacementText = decl.LiteralEntityValue;
		}