Help with Read Byte
Posted: Wed Mar 29, 2017 7:36 pm
Hello,
I am trying to read in XML files character by character, I have this part working but for some reason whenever there is a "&" in the value for a node the return has "amp;" after it. I have no idea why this happening and the method that I am using to read the value in is:
and the string that I am trying to read in is:
"B R FUNSTEN & CO DBA TOM DUFFY"
Any help that you can offer would be great
__________________________________________________
Code tags added
26.04.2017
RSBasic
I am trying to read in XML files character by character, I have this part working but for some reason whenever there is a "&" in the value for a node the return has "amp;" after it. I have no idea why this happening and the method that I am using to read the value in is:
Code: Select all
If ReadFile(#c_file_id, in_file_name)
Dim w_level_id.s(#c_max_level)
Dim w_value.s(#c_max_level)
Dim w_sequence.l(#c_max_level)
w_next_sequence = 1
w_cur_level = 0
w_in_tag = #False
w_in_tag_type = 0
w_in_quotes = #False
w_in_h_tag = 0
w_in_value = #False
w_tag_id.s = ""
w_value_cur.s = ""
While Not Eof(#c_file_id)
i = ReadByte(#c_file_id)
w_in_char.s = Chr(i)"B R FUNSTEN & CO DBA TOM DUFFY"
Any help that you can offer would be great
__________________________________________________
Code tags added
26.04.2017
RSBasic