I recently had a problem reading an XML, where the value of the field seems to have a special character.
Below is the snippet I created for the problem
declare @xml as xml
set @xml = '<ConsumerList>
<Consumer>
<SourceSystem Code="brz12undprl">
</SourceSystem>
<PersonalData>
<LocalFullName>Jaqueline Serra</LocalFullName>
</PersonalData>
<ContactInformation>
<PhoneList>
<Phone TypeCode="mblprs">
<PhoneNumber>11111</PhoneNumber>
</Phone>
</PhoneList>
</ContactInformation>
</Consumer>
</ConsumerList>'
SELECT
Tbl.Col.value('(ContactInformation/PhoneList/Phone/PhoneNumber)[1]', 'varchar(80)') PhoneNumber1
FROM @xml.nodes('//ConsumerList/Consumer') Tbl(Col)
Ἧ I have identified that this is the value that is brought into the field that breaks xml , but reading XML can not detect this information
Apparently for the program when reading the information '11111' in the TAG it shows '11111?'
Can you tell me if I should read the content differently from the one indicated above?
Below the problem playback:
Thanks for the help!