4 Replies Latest reply on Jun 17, 2019 3:02 AM by Annalakshmi T

    Unable to read data from an xml element since one of the attribute belongs to a different namespace

    Annalakshmi T New Member

      Hi All,

         Can you please help me resolve this issue? We are using Informatica 10.2 and trying to read data from an XML file. The xml file has 2 namespaces. First namespace is used for all the elements other than one attribute in an element which refers to a generic namespace. This element is a multiple occuring element and we are not able to read the data from this element. We tried removing this namespace defined within the element and then we were able to read the data from this element.

      Please find the sample XML file below.

      <? xml version="1.0" encoding= "UTF-8" ?>

      <Mi data xmlns ="http://www.abc.com/xml">

      <header>

               <creationdate> 2019-06-02 </creationdate>

               <createdby> user </createdby>

      </header>

      <body>

             <consumerno> 111111 </consumerno>

             <consumername> john </consumername>

             <Multi_elements>

                   <multi_element xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:type="text_type" name="bankcode">

      <value>abc</value>

      <multi_element>

      <multi_element xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:type="date_type" name="responsedate">

      <value>2019-06-02Z</value>

      <multi_element>

      </Multi_elements>

      </body>

      </Mi data>

       

      We are not able to read the element and attributes which are defined in multi_elements tag. We tried to define the namespaces on top and prefixing all elements and attributes, it did not work. However when we tried to remove the generic namespace xsi mentioned here, we were able to read the values of this name attribute and value element. Anybody has faced this issue? Any help is appreciated.

       

      Thanks,