Ejemplo n.º 1
0
        void UnknownElement(object o, XmlElement elem, string qnames)
        {
            int line_number, line_position;

            if (Reader is XmlTextReader)
            {
                line_number   = ((XmlTextReader)Reader).LineNumber;
                line_position = ((XmlTextReader)Reader).LinePosition;
            }
            else
            {
                line_number   = 0;
                line_position = 0;
            }

            XmlElementEventArgs args = new XmlElementEventArgs(elem, line_number, line_position, o);

#if NET_2_0
            args.ExpectedElements = qnames;
#endif

            if (eventSource != null)
            {
                eventSource.OnUnknownElement(args);
            }
        }
Ejemplo n.º 2
0
 internal virtual void OnUnknownElement(XmlElementEventArgs e)
 {
     if (onUnknownElement != null)
     {
         onUnknownElement(this, e);
     }
 }