Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2014
    Posts
    3

    Unanswered: Unable to parse XML response in PL/SQL

    Hello,

    I am not able to parse/read XML response when its has special character in response.

    When we call the webService I am passing below :-

    <City>Anáhuac</City>

    When the response comes, the request also has special characters in return:-

    <City>An?ac</City>

    Sample Request :-
    <Consignee>
    <CompanyName>Tauseef</CompanyName>
    <AddressLine>Atcllk 34</AddressLine>
    <City>Anáhuac</City>
    <Division>DF</Division>
    <DivisionCode>MX</DivisionCode>
    <PostalCode>06501</PostalCode>
    <CountryCode>MX</CountryCode>
    <CountryName>MX</CountryName>
    <Contact>
    <PhoneNumber>123456789</PhoneNumber>
    </Contact>
    </Consignee>

    Sample Response :-
    <Consignee>
    <CompanyName>Tauseef</CompanyName>
    <AddressLine>Atcllk 34</AddressLine>
    <City>An?ac</City>
    <Division>DF</Division>
    <DivisionCode>MX</DivisionCode>
    <PostalCode>06501</PostalCode>
    <CountryCode>MX</CountryCode>
    <CountryName>MX</CountryName>
    <Contact>
    <PhoneNumber>123456789</PhoneNumber>
    </Contact>
    </Consignee>

    We are trying to read using below piece of code where 'pi_http_response' is passing the response the data :-

    vl_xmlpar_obj := xmlparser.newparser;
    xmlparser.parsebuffer (vl_xmlpar_obj, pi_http_response);
    vl_xmldoc_obj := xmlparser.getdocument (vl_xmlpar_obj);
    xmlparser.freeparser (vl_xmlpar_obj);
    vl_status :=
    xmldom.getnodevalue
    (xmldom.getfirstchild
    (xmldom.item (xmldom.getelementsbytagname (vl_xmldoc_obj,
    'ActionNote'
    ),
    0
    )
    )
    );

    Tauseef

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Let us start with some basic details.
    1) what is Operating System name & version?
    2) what is the OS characterset?
    3) what is Oracle version to 4 decimal places.
    4) what is the database characterset?

    >I am not able to parse/read XML response
    above is 100% devoid of any actionable detail. What is the exact error which gets reported?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •