IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  XQuery - Access to element name

    Posted Wed April 21, 2004 04:09 PM

    Is there a way of getting an element name in XQuery?

    I want to take an element name and use it as the value of an attribute.

    For example to convert
    Smith
    to
    Smith


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: XQuery - Access to element name

    Posted Wed April 21, 2004 06:15 PM

    Hello

    There is a way of getting the element Tag name with an XQuery using the function “local-name” with input of the node.
    For example (in your case with node:surname):
    ** Attention this updates your DB

    update
    for $x in input()/surname
    do
    insert attribute label {local-name($x)}
    into $x

    For testing reasons it is better to use **

    for $x in input()/surname
    return
    {attribute label {local-name($x)}}
    {$x/@*}
    {$x/node()}



    kind regards


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: XQuery - Access to element name

    Posted Thu April 22, 2004 11:44 AM

    Thanks Scholz - that was the answer I was looking for.

    Kind regards,
    David Sanders


    #Tamino
    #webMethods
    #API-Management