get the name of an XML tag

Hello

Is it possible in OSB, such that I can get the name of an XML tag for example if I want to assign the name of tag transactionType of the below mentioned XML to a variable, can I do it using an XQuery function?

<? XML version = "1.0" encoding = "UTF-8"? >
< tns:sandstonetns xmlns:tns = "http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation = "http://sandstone.response.transactionHistory.app.nab.cz.fc.ofss.com Sandstone_Data_Transaction_History_Response.xsd" > ""
< tns:listOfTransactions >
< tns:transactions >
< tns:clients >
< tns:clientID > tns:clientID < / tns:clientID >
< / tns:clients >
< tns:timestamp > 2001-12-31 T 12: 00:00 < / tns:timestamp >
< tns:sequenceNumber > tns:sequenceNumber < / tns:sequenceNumber >
< tns:description > tns:description < / tns:description >
< tns:amount > 0 < / tns:amount >
< tns:accountNumber > tns:accountNumber < / tns:accountNumber >
< tns:debitOrCreditFlag > tns:debitOrCreditFlag < / tns:debitOrCreditFlag >
* < tns:transactionType > all < / tns:transactionType > *.
< / tns:transactions >
< / tns:listOfTransactions >
< tns:returnResponse >
< tns:returnCode > 0 < / tns:returnCode >
< tns:returnDescription > tns:returnDescription < / tns:returnDescription >
< / tns:returnResponse >
< / tns:sandstonetns >

Published by: rahulc on January 19, 2011 04:43

You can use fn:local - name ().

http://www.xqueryfunctions.com/XQ/fn_local-name.html

Kind regards
Anuj

Tags: Fusion Middleware

Similar Questions

  • How to get the name element and xml comment in a page?

    I need to list all the name element and comment on a page

    You can use below methods.

    IXMLUtils::GetElementIndices()

    IFrameList::QueryFrameContaining()

  • How to get the name of the previous tag of an xml in java

    Hai

    I need to get the name of the previous tag from an xml in java.

    I got the current tagname, I need to get the previous tagname attribute

    NodeList parentactionList = lParentRule.getElementsByTagName)

    "parentactiondetails" );

    I use this way to get the the current tag name, I need to get the name of the previous tag IE... before 'parentactiondetails'

    for the sample

    < / parentruledetails >
    < / Parentrule >
    < / SingleParentRule >
    < parentactiondetails ACTION_FLAG = "RulePass" PARENT_RULE_CODE = "PR626" / >
    < ParentCompliance >

    I have xml like this I'm getting the "parentactiondetails"... now I need to get the name of the previous tag < / SingleParentRule > Java

    Can someone help me,

    The following code retrieves the tag replacing "parentactiondetails."

    NodeList children = doc.getElementsByTagName("parentactiondetails");
    for (int i = 1; i < children.getLength(); i = i + 2) {
         // Alternate child ( tag).
         Node nd = children.item(i);
         // Print node name
         System.out.println(nd.getNodeName());
         //Get attributes
         NamedNodeMap attributes = nd.getAttributes();
         for (int j = 0; j < attributes.getLength(); j++) {
              Node attr = attributes.item(j);
              //Print the attribute key and value
              System.out.println("\t" + attr.getNodeName() + " -- "
                        + attr.getNodeValue());
         }
    }
    
  • Can ODI - I get the name of the file in a variable?

    Hello, I am trying to get the name of the folder (or subfolder) dynamically over the package that is currently running. I tried various API (from the Toolbox) calls including < % = odiRef.getSession("SESS_NAME") % >, but this isn't quite what I need.  I'm real new to ODI...

    I'm under ODI 11.1.1.6

    Thanks in advance.

    CL

    Yes, I think that this decision if more flexible. I use this way.

    . or you could hold information about the records in the table or XML file or a properties file and store it in the variable... It depends on your tasks and objectives

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • Get the name of the column in the Select row

    Hi guys,.

    I paint a picture in which there is commandlink in a line for each Column.When I click af:commadLink I want to get the name of the column on which commandLink is clicked.
    I tried to get currentRow Clicked from DCIteratorBinding but I want the column name or a column and index.

    Thank you
    Rahul

    Hello

    I added a tag of f: attribute for the command link, give it a name and provide the column name as value. In the ActionListener method, access you the link to actionEvent.getUIComponent (). Here call you getProperties or get attributes (one of the two exists) which returns a map. On the plan that you call get ("the f_attribute name") to get the column name

    Frank

  • UMS adapter - get the name of the incoming e-mail attachment

    Hello

    Based on this blog http://technology.amis.nl/2012/05/18/proces-email-with-the-new-ums-adapter-of-soa-suite-ps5/

    I'm trying to get the name of the attachment to identify its type (format PDF, XML, etc.) and save it as the proper name. However the schema generated by the service of UMS adapter is not provide information useful to achieve this metadata.

    Did you hear an idea, solution or documentation to get the name of the attachments?

    Thanks in advance.

    The problem has been resolved. New version 11.1.1.7.0 includes a new feature called ora: getAttachmentProperty (propertyName, varName [, partName [, query]]). With this function we can extract some headers MIME Content- type, Content-Description, etc.

    For example:

    ORA: getAttachmentProperty('Content-Type', 'varBpelInput', 'body', '/ns3:message/ns3:attachment[1]')

  • Is there a way to get the name of the currency of the members of the outline

    Guys,

    Is there a way to get the names of the currencies of the members. I don't see any VB API function to do this. How can I get it?

    See you soon,.
    PM

    Mikki, if you want to just take one of your dimension of 'Country' and see what the currency is associated with him, call it EsbGetMemberInfo or EsbOtlGetMemberInfo will do (at least, according to the docs, do not remember having ever done).

    Only valid in > = 11.1.2. but if you export the outline to XML go MaxL, information is here too.

  • How to get the value of a particular tag to a column (clob)

    Hi friends,

    How to get the value of a particular tag to a column (clob), which has an XML value?

    Thanks in advance.

    Kind regards
    Sirot Chauvet

    You are welcome, if you got your answer to the question as such brand

  • HP pavilion dv6: how to get the name of the product

    Cannot get the name of the model in order to download the proper drivers .will help as soon as possible. THX

    Hello

    You can usually get this by holding down the fn key and pressing ESC, or see here for a guide to the location of such information.

    Kind regards

    DP - K

  • Get the name of the network license server automatically?

    Is it possible, perhaps by means of Windows Script, to get the name of a computer is currently using the license server?

    Hi Rose Dalban,.

    You can know which servers a computer turns to the registry HKEY_LOCAL_MACHINE\SOFTWARE\FLEXlm Manager\NILM_LICENSE_FILE license key

  • How to get the name of a class private data controls?

    How can I get the names of the controls within a class private data?

    I use the framework of the actor and try to create a tha method will be executed when run the actor. This method should an o list all names of control inside the data class to find the initial value within a configuration file (config.ini file), the key to the configuration file will be the name of the control.

    Thank you.

    You already do the substitution method just because you write for the bundle by name.  And then how are you going to respond to all types of data might be the key.  You do more difficult things that it takes to really very few benefits.

  • Get the name of the current stage of MainSequence in parallel sequence

    Hello

    I starts a sequence in parallel of the MainSequence by "use new run." This parallel sequence is constantly in querying CPU performance data for my USE and records 'on the fly' an Excel file while the MainSequence turns the test scenario.

    To get a clear reference of the performance of the CPU DUT to test steps, I need to somehow get the name of the step of the test step currently performed in the MainSequence for saving it and the CPU performance data.

    Is it possible to identify the current stage of the main sequence in the parallel sequence (for example, property)?

    Thanks in advance,

    MRet

    Rette01 wrote:

    Hi Doug,.

    Finally, we have updated to TestStand 2013 and try to use your example.

    We have some problems to get the referral of wire, which is replaced by "threadToMonitor" in the expression you have posted, as far as I understand.

    The thread to monitor is the MainSequence. So, how can I get a reference to the MainSequence?

    Kind regards

    Rette01

    Pass RunState.Thread as a parameter to the call of the sequence. The parameter must be specified as an object reference variable.

    -Doug

  • Get the names of palette file types

    Hello

    How can I get the names of all types of step programmatically in a palette file?

    In my view, it should be possible, but I tried different approaches using the poster of API reference and couldn't find a way.

    Thank you and best regards,

    Aditya

    TestStand 4.2.1

    LabVIEW 2009 SP1

    propertyObjFile.TypeUsageList.NumTypes

    propertyObjFile.TypeUsageList.GetTypeDefinition)

    typeaspropobj. TypeCategory is TypeCategory_StepTypes

    Hope this helps,

    -Doug

  • Get the names of cluster variables

    I have a cluster with a number of numeric variables that are grouped by names. The names and their associated values are now to provide a header of PDM-file via the "TDMS Set Properties" VI. This VI requires the names and values to be separated in the entries of "Property values" and "property names. My question is how to get the names of variables out of the cluster of an array of strings?

    I hope that there will be a nice solution for this but I have not found it.

    The 'Get Array cluster names' suggestion of the community seem to be adsvanced?

    Based on the suggestion of OpenG , here is an excerpt:

    Tone

Maybe you are looking for