Пример #1
0
		/// <summary>
		/// Emulates the behavior of a SAX parsers. Sets the value of a property.
		/// </summary>
		/// <param name="name">The property name, which is a fully-qualified URI.</param>
		/// <param name="value">The requested value for the property.</param>
		public virtual void setProperty(System.String name, System.Object value)
		{
			switch (name)
			{
				case "http://xml.org/sax/properties/lexical-handler":
				{
					try
					{
						lexical = (XmlSaxLexicalHandler) value;
						break;
					}
					catch (System.Exception e)
					{
						throw new ManagerNotSupportedException("The property is not supported as an internal exception was thrown when trying to set it: " + e.Message);
					}
				}
				default:
					throw new ManagerNotRecognizedException("The specified feature: " + name + " is not recognized");
			}
		}
Пример #2
0
		/// <summary>
		/// Public constructor for the class.
		/// </summary>
		public XmlSAXDocumentManager()
		{
			isValidating = false;
			namespaceAllowed = false;
			reader = null;
			callBackHandler = null;
			errorHandler = null;
			locator = null;
			lexical = null;
			entityResolver = null;
			parserFileName = "";
		}