Skip to Content
avatar image
Former Member

Accessing Element's name in Message mapping

Hi,

I need to Access the Element's name in Message mapping (Using graphical tool or in user defined function).

For Example:

Element: <Company_Name>XYZ Co </Company_Name>

I need to access the Element's name(i.e.)<b>"Company_Name"</b>. So that I can map it as

<Element>Company_Name</Element>

<Element_Value>XYZ Co </Element_Value>

in the target message.

Kindly provide your inputs.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 25, 2006 at 11:10 AM

    Hi,

    You will definitely know the name of the node when u are doing the mapping for that particular source to target structure. So what is the special need to get the elements name.

    Regards,

    Sudharshan

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 25, 2006 at 11:32 AM

    Hi Santhosh,

    I am not sure if this can be done using your Graphical Mapping, but this is possible using JAVA mapping. Your SAX and DOM parsers for JAVA mapping provides methods like getChildNodes, getElementName using which you can get the name of the element.

    Check this link for the methods available for Java Mapping,

    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html

    I think the same can also be done using XSL mapping. Though, I am not sure what method should be used for the same.

    Hope this helps,

    Regards,

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 27, 2006 at 12:52 PM

    Hi Santhosh,

    this is definitively not possible.

    The mapping tool does not store the name of the source tag, so you cannot access the name.

    The only thing you can read is the name of the target tag, but I think this will not help you in your case.

    Regards

    Stefan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 27, 2006 at 01:05 PM

    Hi,

    Thanks for your Inputs on reading Source element's name.

    How to read the target element's name?, kindly explain

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 25, 2006 at 11:26 AM

    Hi,

    Thanks for your input. I don't want to use a Constant with the Element's name and map it to target <Element>, but instead I need to access the Element's name and then map it.

    I need to map nearly 220 elements like this, So I am looking at accessiing the elements's name to make the mapping easier.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 25, 2006 at 11:54 AM

    Hi,

    Thanks for your input.I am not using Java mapping in this case.So how can I access the element's name inside a User Defined function which inturn can be helpful in Graphical mapping.

    Add comment
    10|10000 characters needed characters exceeded