internal bool XmlParse(XmlNode aNode, SXILParser aMasterParser) { bool handled = false; // SXILParserNode child = this[aNode.Name]; if (child != null) { child.Parser = aMasterParser; child.XmlParse(aNode); handled = true; } else { // No direct name-based match, check for multi entries foreach (KeyValuePair <int, SXILParserNode> kvp in iNodes) { SXILParserNode parserNode = kvp.Value; bool isMulti = parserNode.IsMulti; if (isMulti) { bool canHandle = parserNode.CanHandle(aNode); if (canHandle) { parserNode.Parser = aMasterParser; parserNode.XmlParse(aNode); handled = true; break; } } } } // return(handled); }
internal void Add(SXILParserNode aParser) { int hash = aParser.GetHashCode(); if (iNodes.ContainsKey(hash)) { throw new Exception("The specified parser node already exists"); } iNodes.Add(hash, aParser); }
private SXILParserNode this[string aName] { get { SXILParserNode ret = null; // int hash = aName.GetHashCode(); if (iNodes.ContainsKey(hash)) { ret = iNodes[hash]; } // return(ret); } }