12-21-2020 01:59 AM
Hello all! greetings hope all are doing great.I'm developing on Labview application which will parse the XML document after that i have to search one particular value e:g "connectionretrystatuscount=1" so we will search whole XML file how many times connection retry ==1 value occurred and and we will display this count to user. We have to parse so many files located under one folder. can someone suggest basic. Ignore my poor english. Any help will be great!
12-21-2020 08:17 AM
Seems pretty straightforward. Where are you stuck?
12-21-2020 03:55 PM
Let me unpack that request a little.
"search whole XML file"... Hint: xml file is just a text file
"have to search for 'connectionretrystatuscount=1'" ... use a string search (match) inside a loop
"display this count to user"... Sounds like a numerical indicator to me
"parse so many files located under one folder" ... another loop with an array of the files to search
As billko said, seems pretty straight forward. Where is the problem?
12-21-2020 11:49 PM
1. I tried searching the particular string but it is giving output as 0.
2.Parsing so many files ( around 500) located under 1 folder this seems difficult to implement.
3.and finally i should get one dashboard on front panel like this refer to attachment user output.
4.Attachment XML data reference is XML data i'm using
5.Attachment search retry count is searching for string Retry count=1 in whole XML
please find attached VIs and expected outcome this is my first assignment and im just a biginner in LABVIEW and i'm finding it interesting to learn so giving my best. any help will be grateful.
Thanks for your response Frozen and bilko!!
12-21-2020 11:51 PM
Hi billko thank you so much for your response i have attached the Vis if you get little time suggest me few steps. It will be helpful. Have a great day
12-22-2020 10:00 AM
First, xml is just a text file. Simple string searches will work. No need to try and parse the xml structure if a simple search will work.
Let me post a picture of example code for you...
Getting a list of files is pretty straight forward too... here is another IMAGE (Photo or Picture) for you to look at.
I have done ALL the work for you... Nice little present for you during these festive times 🙂
12-22-2020 11:43 AM
Man No words for you!! I'm from mechanical engineering background trying to learn LabVIEW on my own. Since last 18 hr i was doing this stuff and you helped me within 1 day. God bless you!! This gave me motivation to learn LabVIEW in depth. Merry Christmas to you Man really Thank you so much!!! Keep supporting whole LabVIEW community.
12-23-2020 02:40 AM
I wonder what should go in here. we have to call N number of files one by one to search for particular string as mentioned .. this part i'll try.. Thanks you so much