Author |
Message
|
muthu121521 |
Posted: Mon Jan 25, 2021 7:01 am Post subject: Unable to parse the XML inside the CData Section |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 35
|
We are having an issue with with one of the C DataSection as below
Quote: |
![CDATA[<
<address1>1036</address1>
<address2>PA "5TH" ST</NS1:address2>
<Employment>
<Employmentpn AddressLine1="47A LEE DR" AddressLine2="LEE PA" AppIndex="1" Employer="ABC "ABC123" XYZ" ZipCode="107086-0000"/>
</Employment>
>]]> |
When i parse the above cdata section in IIB i am able to get the address 2 field as PA "5TH" ST
But the Employer Attribute inside the Employment Tag coming only as
Employer="ABC "ABC123" XYZ"
How do we parse the attributes inside the field |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jan 25, 2021 8:05 am Post subject: Re: Unable to parse the XML inside the CData Section |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
muthu121521 wrote: |
But the Employer Attribute inside the Employment Tag [b]coming only as
Employer="ABC "ABC123" XYZ" |
So, to be clear, you're parsing this CDATA section using ESQL. The escaped characters are being correctly converted if they're the content of a tag, but are not being converted if the escape occurs within the text of a attribute.
Do I have that correct?
If so, please post the PARSE statement that you're using along with the version of IIB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
muthu121521 |
Posted: Tue Jan 26, 2021 8:49 am Post subject: |
|
|
Apprentice
Joined: 31 Aug 2015 Posts: 35
|
Code: |
DECLARE inCCSID INT InputProperties.CodedCharSetId;
DECLARE inEncoding INT InputProperties.Encoding;
CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' PARSE(InputRoot.XMLNSC.ns1:Response.SubmitResult, inEncoding, inCCSID); |
IIB Version is 10.0.0.11
I have an IIB ACE Version 11.0.0.9 in my Local laptop as well, Even I have tried there as well but the same result |
|
Back to top |
|
 |
timber |
Posted: Thu Jan 28, 2021 4:03 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1162
|
Please can you supply
- the input XML document (remove anything confidential, obviously)
- the output of a Trace node showing the contents of the message tree |
|
Back to top |
|
 |
|