Search results for query: *

  1. R

    Question Load Excel data into Dictionary

    Hello, Eg: I have an excel data as below I am trying to load data into dictionary First column as a Key and Second column (list of strings) as a Value first column S1 need to have Info1, Info2 Whenever there is a string in data column from there I need to check the corresponding group column...
  2. R

    After Copying XML node from one document to another document the values after decimal point is lost

    file1: Input XmlDocument f2 = new(); f2.Load(Input.xml); XmlNodeList t1= f2.GetElementsByTagName("TIMING"); XmlDocument f2 = new(); XmlElement root= f2.CreateElement("Rootnode"); f2.AppendChild(root); foreach (XmlNode node in t1) { foreach (XmlNode cn in node .ChildNodes) { if...
  3. R

    After Copying XML node from one document to another document the values after decimal point is lost

    Hello All, I am facing a awkward behavior in C# and I really would appreciate your help. I have a XML file 1 (Input file) and copying some nodes to another Xml file so after copied the .0 is lost for eg: if I have value (innertext) 1.0 then after copied it changed to 1 (I know like 1.0 and 1...
  4. R

    how to Remove duplicates from List<String[]>

    I mean like if row[1] = abc, xyz, ford, ferrari, bmw, benz, honda row[2] = abc, xyz, gm, maruthi, ola, ather, tvs row[3] = abc, sxc, ford, ferrari, bmw, benz, honda row[4] = abc, xyz, gm, ford, ola, ather, tvs here row1 and row3 starting from 3 index has all same data so I would like to remove...
  5. R

    how to Remove duplicates from List<String[]>

    @Skydiver @jmcilhinney I mean like if row[1] = abc, xyz, ford, ferrari, bmw, benz, honda row[2] = abc, xyz, gm, maruthi, ola, ather, tvs row[3] = abc, sxc, ford, ferrari, bmw, benz, honda row[4] = abc, xyz, gm, ford, ola, ather, tvs here row1 and row3 starting from 3 index has all...
  6. R

    Resolved check if list contains item from another list

    Hello jmcilhinney thanks a lot for your input and it worked 👍
  7. R

    Resolved check if list contains item from another list

    Hello All, In below Dictionary I have a list<string> and would like to check local string within this list and if it does not contains would like to add to the list. Can anyone please help me out with the logic in if condition Dictionary<string, Dictionary<string, List<string>>> dictLst =...
  8. R

    Resolved Parent Node format issue after deleting/removing all child nodes

    Hello, I have written below code to delete all child nodes and after deleting it the parent node format is not in expected way. XmlNodeList packgList = _xd.GetElementsByTagName("Package"); foreach (XmlNode pkg in packgList) { foreach (XmlNode test in pkg.ChildNodes) { if...
  9. R

    Resolved "xsi" missing from schema location

    Sorry for the delay in response guys and thank you so much for helping me out @Skydiver I tried post #9 and it worked @JohnH I already tried #6 and that too worked -> currently using a method Create Attribute now shifted to post #9 method which reduces 2 lines ?
  10. R

    Resolved "xsi" missing from schema location

    I tried the approach you mentioned and now I am getting the output as below <Package xmlns="http://www/org/2007" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" d1p1:schemaLocation="http://www.org/schema/.xsd"> (d1p1 instead of xsi) ??
  11. R

    Resolved "xsi" missing from schema location

    I am creating an XMLDocument xsi prefix is missing from the schema location when I save the file My input is : XmlElement rootnode = xml.CreateElement("Package"); rootnode.SetAttribute("xmlns", "http://www/org/2007"); rootnode.SetAttribute("xmlns:xsi"...
  12. R

    Resolved Why my recursive function calling itself again after returning the value ?

    Hi Skydriver, Yeah I tried the above pseudo code with slight modification and it returns out path fast compare to my code in #1 post
  13. R

    Resolved Why my recursive function calling itself again after returning the value ?

    String is a fixed one Before coming to the Getpath first I am checking if the signal name is same as node firstchild (shortname) inner text then i am calling getpath to get path of the node (something like root text/children/children/node name) The reason why i use it again is because working...
  14. R

    Resolved Why my recursive function calling itself again after returning the value ?

    Please check code and naming too Does it makes sense now ?? or else give me some suggestions
  15. R

    Resolved Why my recursive function calling itself again after returning the value ?

    Can you please tell me is the below code is a correct way to implement ? Previous Implementation: Basically If the Inner text of the children element matches then I need all the parent element Inner text to create a path for my further use so In the previous code (mentioned above) I used a...
  16. R

    Resolved Why my recursive function calling itself again after returning the value ?

    The above code is the actual code and yes I am calling this in for loop like approximately 500 times..
  17. R

    Resolved Why my recursive function calling itself again after returning the value ?

    The problem is after the node.parentNode is null it's returning but it's going back to the GetPath function and executing and returning it. so what should I do? Due to this my program is running for a very long time public static List<string> GetPath(XmlNode node, List<string> parentList)...
  18. R

    Excel cell dealing with nulls and doubles

    string TempText = Convert.ToString(xlWorkSheet.Cells[i, 5].Value2); Try this ... it will help you
  19. R

    How to get all Parent Elements ?

    Hey Hi thanks for the idea and yeah I implemented with recursive and struggled with some edge cases and finally its working. (y) (y) (y)
Back
Top Bottom