subroutine ParseClient (structure Client: Client_ST,
string: XML_SV,
boolean: Error_BV) is
integer Position_LIV
Occurrance_LIV
string Tag_LSV
Field_LSV
SubString_LSV
initialize Client_ST
copy "Name" to Tag_LSV
call ParseNextXMLString (XML_SV,
Position_LIV,
Tag_LSV,
Field_LSV,
Error_BV)
if not Error_BV then
copy Field_LSV to Client_ST.Name
copy "Address" to Tag_LSV
call ParseNextXMLString (XML_SV,
Position_LIV,
Tag_LSV,
SubString_LSV,
Error_BV)
end if
if not Error_BV then
initialize Client_ST.Address_STR
copy 1 to Position_LIV
copy "Line" to Tag_LSV
for Occurrance_LIV = 1 to 3 loop
call ParseNextXMLString (SubString_LSV,
Position_LIV,
Tag_LSV,
Field_LSV,
Error_BV)
if (Field_LSV = "") then
leave loop
end if
copy Field_LSV to Client_ST.Address_STR.Line[Occurrance_LIV]
end loop
end if
if not Error_BV then
copy "City" to Tag_LSV
call ParseNextXMLString (SubString_LSV,
Position_LIV,
Tag_LSV,
Field_LSV,
Error_BV)
end if
if not Error_BV then
copy Field_LSV to Client_ST.Address_STR.City
copy "PostalCode" to Tag_LSV
call ParseNextXMLString (SubString_LSV,
Position_LIV,
Tag_LSV,
Field_LSV,
Error_BV)
end if
if not Error_BV then
copy Field_LSV to Client_ST.Address_STR.PostalCode
end if