Exemple #1
0
        public IDictionary <string, string> WorkOnElement(IAwareXmlTextReader xmlReader)
        {
            if (_innerWorker == null)
            {
                return(new Dictionary <string, string>());
            }

            return(_innerWorker.WorkOnElement(new AwareXmlTextReader(xmlReader)));
        }
Exemple #2
0
        private IDictionary <string, string> ParseElement(IAwareXmlTextReader xmlReader, ICardInfoParserWorker worker)
        {
            IDictionary <string, string> parsedInfo = new Dictionary <string, string>();
            bool readOk = worker.WorkOnCurrentAtStart || xmlReader.Read();

            while (readOk)
            {
                if (xmlReader.NodeType == XmlNodeType.Element)
                {
                    IDictionary <string, string> workOnElement = worker.WorkOnElement(new AwareXmlTextReader(xmlReader));
                    parsedInfo.AddRange(workOnElement);
                }
                readOk = xmlReader.Read();
            }

            return(parsedInfo);
        }