Skip to Content
author's profile photo Former Member
Former Member

How to extract data from this namespace

Hi all,

Anyone knows how to extract the value ABC from the XML below namespace ?

HELP !!!!

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

ABChttp://xidevt.sec.abc.net/common">ABC>

Thanks in Advance

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 11:53 AM

    Hi all,

    I need to extract the value ABC from the below using ABAP mapping. Anyone knows how to do it with ABAP MAPPING ?

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

    ABChttp://xidevt.sec.abc.net/common">ABC>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I am trying to use this ABAP command to extract the value ABC from the below. It does not seems to retrieve it. Can anyone tell me what is wrong with it

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

      ABChttp://xidevt.sec.abc.net/common">ABC>

      My ABAP code is as follows.

      a_ncoll1 = a_idocument->get_elements_by_tag_name_ns( name = 'CompanyCode' ).

      a_node1 = a_ncoll1->get_item( 0 ).

      elmt_value = a_node1->get_value( ).

  • Posted on Aug 03, 2006 at 11:36 AM

    Hi,

    <b>This is not a well defined XML structure</b>. Can you please elaborate on what actually you are trying.

    Regards,

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 11:37 AM

    Hi,

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

    ABC http://xidevt.sec.abc.net/common">ABC>

    This is not a valid xml. ABC should have opening and closing tags other than the ns0 tag.

    Regards,

    Smitha.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 03, 2006 at 11:42 AM

    Hi,

    first: this is <b>well formed</b>. Of course it is not valid, we dont have a DTD or a schema. Well defined doesnt exist in XML world.

    You can extract with mappings like Java, ABAP, graf mapping or XSL.

    Here one example for XSL:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://xidevt.sec.abc.net/common">
    	<xsl:template match="/">
    		<extraction>
    			<xsl:value-of select="ns0:CompanyCode"/>
    		</extraction>
    	</xsl:template>
    </xsl:stylesheet>

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Udo,

      I guess if one uses graphical Mapping in such a scenario, one can get some exception. But like u mentioned using a JAVA or ABAP mapping , one can extract the data out of the InputStream as needed.

      Was thinking in terms of graphical mapping 😊 Java and ABAP can help in such cases I guess.

      Regards,

      Bhavesh

  • Posted on Aug 04, 2006 at 01:33 AM

    Dude,

    that message is received by XI?

    Just create a XSD that defines this XML (that should be very easy), import it as an external definition and define necessary message interfaces and mappings for your scenario.

    Regards,

    Henrique.

    Add comment
    10|10000 characters needed characters exceeded