private void processChildNodes(XmlNode parentNode) { DataElement dataElement = new DataElement(); XmlNodeList childNodes = parentNode.ChildNodes; foreach (XmlNode childNode in childNodes) { if (childNode.Name == Constants.NodeTypeString.SE_DATA) { dataElement.EvaluateData(childNode); } else if (childNode.Name == Constants.NodeTypeString.SE_IF) { new Conditions().EvaluateCondition(childNode); } else if (childNode.Name == Constants.NodeTypeString.SE_FOREACH) { new Loops().EvaluateLoop(childNode); } else if (childNode.Name == Constants.NodeTypeString.SE_ROWS) { new Tables().FetchTable(childNode); } } }
public void processNodes() { // Loop through the template and accumulate the output while (templateParser.HasNextNode()) { XmlNode currentNode = templateParser.GetNextNode(); switch (templateParser.GetNodeType(currentNode)) { case NodeType.Data: dataElement.EvaluateData(currentNode); break; case NodeType.If: conditionEvaluator.EvaluateCondition(currentNode); break; case NodeType.ForEach: loopEvaluator.EvaluateLoop(currentNode); break; case NodeType.ForEachRows: table.FetchTable(currentNode); break; default: if (currentNode.NodeType == XmlNodeType.Element) { ExportCore.WriteLog("Node type [" + ((XmlElement)currentNode).Name + "] not supported. Will be ignored"); } break; } } }
public void processNodes() { DCODataRetrieverWithoutDoc dCODataRetriever = new DCODataRetrieverWithoutDoc(); if (CurrentDCO.ObjectType() == Constants.Batch) { dCODataRetriever.createFilePageMap(); } // Loop through the template and accumulate the output while (templateParser.HasNextNode()) { XmlNode currentNode = templateParser.GetNextNode(); switch (templateParser.GetNodeType(currentNode)) { case NodeType.Header: dataElement.setIsHeader(true); dataElement.EvaluateData(currentNode); dataElement.setIsHeader(false); break; case NodeType.Data: dataElement.EvaluateData(currentNode); break; case NodeType.If: conditionEvaluator.EvaluateCondition(currentNode); break; case NodeType.ForEach: loopEvaluator.EvaluateLoop(currentNode); break; case NodeType.ForEachRows: table.FetchTable(currentNode); break; default: if (currentNode.NodeType == XmlNodeType.Element) { ExportCore.WriteLog("Node type [" + ((XmlElement)currentNode).Name + "] not supported. Will be ignored"); } break; } } }