tufanv Expert Licensed User Longtime User Sep 19, 2016 #1 Hello I was checking out Erel's xmlsax tutorial and tried it on my xml. But my xml style is totally different so i dont know how to get a value for a specific date. this is the xml link: http://www.namazvakti.com/XML2016/16/16742.xml i copied it to files folder and parsed it with xmlsax. Erel's tutorial's xml seems different to me ( I dont have any experience in xml files so i dont know if it is different or not) It would be nice if some one can point me to right direction for geting the times for dayofyear 30 for example. Code: <prayertimes dayofyear="30" day="30" month="1">5:32 5:48 7:12 8:02 12:14 12:35 15:20 16:02 16:57 17:38 18:30 19:07 19:18 10:08 a b </prayertimes> there are 12 different times for different purposes. Lets say i want to get the 4th on that is 8:02 Thanks for your help in advance.
Hello I was checking out Erel's xmlsax tutorial and tried it on my xml. But my xml style is totally different so i dont know how to get a value for a specific date. this is the xml link: http://www.namazvakti.com/XML2016/16/16742.xml i copied it to files folder and parsed it with xmlsax. Erel's tutorial's xml seems different to me ( I dont have any experience in xml files so i dont know if it is different or not) It would be nice if some one can point me to right direction for geting the times for dayofyear 30 for example. Code: <prayertimes dayofyear="30" day="30" month="1">5:32 5:48 7:12 8:02 12:14 12:35 15:20 16:02 16:57 17:38 18:30 19:07 19:18 10:08 a b </prayertimes> there are 12 different times for different purposes. Lets say i want to get the 4th on that is 8:02 Thanks for your help in advance.
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2016 #2 There is a single XML text element here. It starts with 5:32 and ends with "a b ". You will need to use XmlSax to get the text element (should be simple) and then split it with Regex.Split. Use \s as the separator. Upvote 0
There is a single XML text element here. It starts with 5:32 and ends with "a b ". You will need to use XmlSax to get the text element (should be simple) and then split it with Regex.Split. Use \s as the separator.
tufanv Expert Licensed User Longtime User Sep 19, 2016 #3 Erel said: There is a single XML text element here. It starts with 5:32 and ends with "a b ". You will need to use XmlSax to get the text element (should be simple) and then split it with Regex.Split. Use \s as the separator. Click to expand... But i have selected the line manually and copied here. I must make the app select todays date inside the xml for example here i selected the 30th of january. If today is 19th september how can i get the actua line from xml ? if i can select the correct line than i can do as you say splitting with regex Upvote 0
Erel said: There is a single XML text element here. It starts with 5:32 and ends with "a b ". You will need to use XmlSax to get the text element (should be simple) and then split it with Regex.Split. Use \s as the separator. Click to expand... But i have selected the line manually and copied here. I must make the app select todays date inside the xml for example here i selected the 30th of january. If today is 19th september how can i get the actua line from xml ? if i can select the correct line than i can do as you say splitting with regex
Erel B4X founder Staff member Licensed User Longtime User Sep 19, 2016 #4 You need to handle the StartElement event and check the attributes. Once you find the correct one, set a global variable and then read the text in EndElement event. Upvote 0
You need to handle the StartElement event and check the attributes. Once you find the correct one, set a global variable and then read the text in EndElement event.