System.Xml.DTDReader.ReadIgnoreSect C# (CSharp) Méthode

ReadIgnoreSect() private méthode

private ReadIgnoreSect ( ) : void
Résultat void
		private void ReadIgnoreSect ()
		{
			ExpectAfterWhitespace ('[');
			int dtdIgnoreSect = 1;

			while (dtdIgnoreSect > 0) {
				switch (ReadChar ()) {
				case -1:
					throw NotWFError ("Unexpected IGNORE section end.");
				case '<':
					if (PeekChar () != '!')
						break;
					ReadChar ();
					if (PeekChar () != '[')
						break;
					ReadChar ();
					dtdIgnoreSect++;
					break;
				case ']':
					if (PeekChar () != ']')
						break;
					ReadChar ();
					if (PeekChar () != '>')
						break;
					ReadChar ();
						dtdIgnoreSect--;
					break;
				}
			}
			if (dtdIgnoreSect != 0)
				throw NotWFError ("IGNORE section is not ended correctly.");
		}