I'm a bit confused on how you would parse part of a string, such as getting an element from an XML document. I still haven't decided on which source I want to get the current date & time from, but below is a perfect example of the question I am asking so that is what I am using for this post.
For example, if I wanted to get the <timestamp> value in B4A or B4J, the simplest way to me would be to search for "<timestamp>", get the index of the start of that string and add the known length, then get the index of "</timestamp>" and use those values to get a substring from the XML document.
However, I'm unsure how I would do this in B4R working with bytes. At least at this point, I don't feel like a have a good grasp on the concept of bytes. So if anyone could please show an example of how I would get this value in B4R, and in the most memory efficient way, I'd really appreciate it as it would help open the door to some other things I would like to do with my B4R project.
For example, if I wanted to get the <timestamp> value in B4A or B4J, the simplest way to me would be to search for "<timestamp>", get the index of the start of that string and add the known length, then get the index of "</timestamp>" and use those values to get a substring from the XML document.
However, I'm unsure how I would do this in B4R working with bytes. At least at this point, I don't feel like a have a good grasp on the concept of bytes. So if anyone could please show an example of how I would get this value in B4R, and in the most memory efficient way, I'd really appreciate it as it would help open the door to some other things I would like to do with my B4R project.
<result>
<status>OK</status>
<message/>
<countryCode>US</countryCode>
<countryName>United States</countryName>
<zoneName>America/Chicago</zoneName>
<abbreviation>CDT</abbreviation>
<gmtOffset>-18000</gmtOffset>
<dst>1</dst>
<dstStart>1520755200</dstStart>
<dstEnd>1541314799</dstEnd>
<nextAbbreviation>CST</nextAbbreviation>
<timestamp>1527884091</timestamp>
<formatted>2018-06-01 20:14:51</formatted>
</result>