public List <TagToReplace> GetTagsToReplace(XmlDocument document) { FillListWithNodesWithAllTags(document); foreach (var currentNodeWithTag in _xmlNodeListWithTag) { TagToReplace newTagToReplace = new TagToReplace(); string valueTmp = currentNodeWithTag.Value; if (valueTmp != null) { if (valueTmp.Any()) { valueTmp = valueTmp.Remove(0, 1); valueTmp = valueTmp.Remove(valueTmp.Length - 1, 1); string[] tagWithAttributes = valueTmp.Split(TagMiddle); if (tagWithAttributes.Count() > 1) { int tagType = TagNameToTagReplaceType(tagWithAttributes[0]); if (tagType > 0) { newTagToReplace.ReplaceType = tagType; newTagToReplace.TagsNode = currentNodeWithTag; List <string> tmpStringList = new List <string>(); for (int i = 1; i < tagWithAttributes.Count(); i++) { tmpStringList.Add(tagWithAttributes[i]); } newTagToReplace.ReplacemantList = tmpStringList; _xmlTagsToReplacesList.Add(newTagToReplace); } } } } } return(_xmlTagsToReplacesList); }
public XmlNode GetXmlTable(XmlDocument document, TagToReplace currentTagToReplace, int applicationId) { XmlTableCreate xmlTableCreate = new XmlTableCreate(); List <List <string> > newNestedList = GetNestedDataList(currentTagToReplace.ReplacemantList, applicationId); XmlNode newXmlTableNode = xmlTableCreate.GetXmlTable(document, newNestedList); return(newXmlTableNode); }