XPath: Displaying attribute names

Hi All,
I have the following XML document. I need to extract both the name and value of the attribites for the element header. Pls let me know how to do this.
<resp>
    <header id="1133255857070" code="3401" env="DV"/>
</resp>I am using the following XPath expression but it is only returning me the attribute values /resp/header/@*. I also need the names of the attributes. I dea is to write them to the text file in the following format
id = 1133255857070
code = 3401
env = DV
Thank you in advance

Do you have to use XPath? If you know the name is header, you can call getElementsbyName(). And that returns you a NodeList.
To get the attribute, use NamedNodeMap, then use Attr class, then you can call getName() and getValue() functions.
Hope this helps.

Similar Messages

  • I want to rename standart attribute names: 'name, display name, ...'. How?

    I had renamed custom attribute names, but I can't do this operation with standart attributes. Help me, please!

    Alexander,
    take a look at table : PORTAL.WWNLS_STRINGS$
    SUB_DOMAIN='pro' NAME='webnode_adm_dispname'
    You'll see the strings. (if no, connect under SYS schema because VPD, perhaps)
    It's up to you to modify it. Not certified at all.
    Patrick.

  • Help in retrieving the element attribute name and value..

    Hi have to retrieve the attribute name and value from the element.....
    requirement is like this
    <ws:GetRightNowProductViewByDivisionResponse xmlns:ws="http://ws.sage.co.uk/">
    <ws:GetRightNowProductViewByDivisionResult ProductID=" " RightNowProductView=""/>
    </ws:GetRightNowProductViewByDivisionResponse>
    i should get all the element attbutes names as attributes in above mentioned format ..using xquery...
    here is the respone ....
    <sage:sageRequestResponse xmlns:sage="http://www.sage.com">
    <env:EaiEnvelope xmlns:env="http://www.sage.com/Envelope">
    <env:Domain>string</env:Domain>
    <env:Service>RightNowBroker</env:Service>
    <env:UserId>string</env:UserId>
    <env:OperationName>GetRightNowProductViewByDivision</env:OperationName>
    <env:Payload>
    <ws:GetRightNowProductViewByDivisionResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.sage.co.uk/">
    <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="RightNowProductView" msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="RightNowProductView">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ProductId" type="xs:short"/>
    <xs:element name="Product" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
    <xs:selector xpath=".//RightNowProductView"/>
    <xs:field xpath="ProductId"/>
    </xs:unique>
    </xs:element>
    </xs:schema>
    <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"/>
    </ws:GetRightNowProductViewByDivisionResult>
    </env:Payload>
    </env:EaiEnvelope>
    </sage:sageRequestResponse>

    Hi
    Just as an aside to the comments above, a scenario we see occasionally is where a desk provides an internal function (e.g. a helpdesk) and you really just want to get the name display (as seen on the handsets) onto the CAD display.
    You can do this by  doing a reverse lookup over HTTP against CUCM. There are a number of posts around, these should get you started :
    https://supportforums.cisco.com/thread/2065114
    https://supportforums.cisco.com/message/3024617
    A couple of notes:
    - It looks up against the directory, NOT the actual calling line. So you can add stuff to the directory to get external callers to show up by name, but should expect the unexpected when you have shared lines (e.g. multipel directory entries with one tel number for whatever reason)
    - If you want to do different lookups (i.e. get names back in a different format, get the actual line display name from CUCM, or lookup elsewhere) then you would need to either:
    1) Do it via SOAP or another technology from the UCCX script engine
    2) Put in a small external web service to do the lookups and allow UCCX to query via simple HTTP
    3) Use a DB for the numbers so you can read/write to it from UCCX and regularly update the data from wherever you like
    Regards
    Aaron HarrisonPrincipal Engineer at Logicalis UK
    Please rate helpful posts...

  • Display attributes from "global" and other entities in a single screen

    As far as I know, in OPM attributes of only one type of entity can be added to any given screen.
    As per of functional requirements of my current project Ihave to display attributes from more than one type of entity in some of the screens.
    I found a workaround for entities which has only one instance (singleton entity in version 10.1), but couldn’t figure out how to display attributes of entities which has multiple instances.
    For example:
    We have an entity called <b>“the child”</b> which has many attributes. There can be more than one child instances defined in a given assessment session.
    This particular screen should have attributes which belong to the <b>"global"</b> and <b>"the child"</b> instances.
    (The names of all the children should be displayed on the screen as <b>check boxes</b> so the user can select the children who are affected by the global attributes displayed on the screen.)
    Is this achievble in OPM 10.1?
    SP1D3R MAN

    Displaying Global attributes and nested entity level attributes on the same question screen cannot be done in OPM 10.1 with out-of-the-box functionality. It would have to be a custom screen. (FYI, I'm not a programmer so I can't advise on how to build such a custom screen.)
    Before building customisations, you should also consider whether you really need to use an old version of the product. OPA 10.1 was released early last year; the current version is 10.3.

  • Displaying more than one display attribute in a tree component problem

    Hi,
    I have a parent table and child table, I want to display a parent table's display attribute and below that i want to display child tables two display attributes (while defining the rule for a tree compoment).
    What i'm getting is :
    I can able to display more than one "display attributes" for my parent table, but when i'm trying to implement that for my child table under my parent table. I am only geting the blank folder structure without names.
    For example:
    Parent table: Deparetment(id, name)
    child table: Employee(id, firstName, lastName)
    What i want is:
    In a Tree:-
    (Department name): software below that i want display both (firstName and LastName) stephen Fleming
    for that employee.

    Hi,
    do you use ADF ? If yes, have a look at "master table with inline detail" option when dragging the master View
    Frank

  • Display Attributes inside nested structure in XML

    Hi Experts,
    I want to generate a xml file as shown below.
    <Profile AppName="Products" SubnodeName="Products">
    <Tag concept="SG_CPT1025797"/>
    <Tag concept="SG_CPT1026847"/>
    <Tag concept="SG_CPT1027620"/>
    <Tag concept="SG_CPT1027622"/>
    </Profile>
    How can i display the xml file like above.
    If i use attributes in my Simple Transformation, the xml file generation gives a error stating, duplicate attributes as the output is something like this.
    <Profile AppName="Products" SubnodeName="Products">
    Tag concept="SG_CPT1025797"
    Tag concept="SG_CPT1026847"
    Tag concept="SG_CPT1027620"
    Tag concept="SG_CPT1027622"
    </Profile>
    Whereas on using Tags in my Simple Transformation, i get the output as shown below.
    <Profile AppName="Products" SubnodeName="Products">
    <Tag concept>SG_CPT1025797SG_CPT1026847SG_CPT1027620SG_CPT1027622</Tag>
    </Profile> .
    How do i resolve this issue.???
    Here is my ST program. This gives the output as shown in the second xml file.
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="PARA"/>
      <tt:variable name="Tag concept"/>
      <tt:template>
        <DATA>
          <USERS>
            <tt:loop name="tp_xml" ref=".PARA">
               <USER>
                <Username>
                  <tt:value ref="$tp_xml.username"/>
                </Username>
                <Password>
                  <tt:value ref="$tp_xml.password"/>
                </Password>
                <Firstname>
                  <tt:value ref="$tp_xml.contact_person_name_first"/>
                </Firstname>
                <Middlename>
                  <tt:value ref="$tp_xml.contact_person_name_middle"/>
                </Middlename>
                <Lastname>
                  <tt:value ref="$tp_xml.contact_person_name_last"/>
                </Lastname>
                <Email>
                  <tt:value ref="$tp_xml.contact_person_email"/>
                </Email>
                <Country>
                  <tt:value ref="$tp_xml.country"/>
                </Country>
                <City>
                  <tt:value ref="$tp_xml.customer_number"/>
                </City>
                <Address>
                  <tt:value ref="$tp_xml.customer_name"/>
                </Address>
                <PostalCode>
                  <tt:value ref="$tp_xml.contact_person_postal_code"/>
                </PostalCode>
                <IMAddress>
                </IMAddress>
                <Title>
                  <tt:value ref="$tp_xml.contact_person_title"/>
                </Title>
                <Status>
                </Status>
                <State>
                  <tt:value ref="$tp_xml.state"/>
                </State>
                <Editable>
                </Editable>
                <NNTPAlias>
                </NNTPAlias>
                <LastModifiedDate>
                  <tt:value ref="$tp_xml.last_modified_date"/>
                </LastModifiedDate>
                <CreatedDate>
                  <tt:value ref="$tp_xml.created_date"/>
                </CreatedDate>
                <UserGroups>
                  <string>KSS</string>
                </UserGroups>
                <Profiles>
                  <Profile AppName="Products" SubnodeName="Products">
                    <tt:loop name="knova_id" ref="$tp_xml.knova_product_id">
                      <tt:attribute name="Tag concept">
                        <tt:value/>
                      </tt:attribute>
                    </tt:loop>
                  </Profile>
                </Profiles>
              </USER>
            </tt:loop>
          </USERS>
        </DATA>
      </tt:template>
    </tt:transform>
    Please help.
    Thanks and Regards
    Gaurav raghav

    Hi Naimesh,
    That solved half pof my problem but it shows the tag <Rows> also which i dont want.
    The XML now looks like
    <Row Tagconcept="12345">
    <Row Tagconcept="56789">
    I want to show it like
    <Tag concept="12345">
    <Tag concept="56789">
    Any idea how to resolve this????
    Thanks for the help.
    Thanks and Regards
    Gaurav raghav

  • How to display Column Names of a Database Table in JSP

    Dear All,
    I want to display all the attribute names(column names) of a database table on JSP.
    [ ex:  mytable contains : ( EmpId,EmpName,Dept ). This should be display as  EmpId--text box                    
    EmpName--text box
    Dept----textbox
    please note , i don't want to display values,but only column names

    Yeah make use of methods like
    ResultSet DatabaseMetaData.getColumns(String catalog, String schemaPattern, String tableName, String columnNamePattern)
    else use
    String ResultMetaData.getColumnName(int column_index)
    search google i'm sure u wud get thousands of example on it... :)

  • How to change View Attribute Name?

    Is there a way to change the attribute name of a view object that was added from and entity Object?
    I dont want to change the Entity Attribute Name since i want to use it in diferent view objects with diferent names...

    Hi Frank
    It would be very convenient to have view object attribute name updateable because the attributes may result from different joins (to same table) and have different meaning depending more on the association than to the table attribute itself (in most case the relationship extend the meaning of the attribute).
    In my use case i have :
    A table FlexTypologyClassMatrix with two foreign key pointed to FlexTypologyClass primary table. That mean that my matrix have two axis defined by the primary key of FlexTypologyClass table.
    I created a view object that correspond to this scheme with eo's FlexTypologyClassMatrix, FlexTypologyClass as FlexTypologyClassAxisX, FlexTypologyClassAxisY).
    The view object attributes from eo's FlexTypologyClassMatrixAxisX or Y are generated from the table attribute name with a suffix like FlextypologyclassL (for FlexTypologyClassMatrixAxisX) and FlextypologyclassL1 (FlexTypologyClassMatrixAxisY).
    The attribute name are the most used item used later in the development cycle and this is not easy to distinguish the X from the Y without analyzing the view object definition. It's not a very productive way to develop application.
    It would be very convenient to permit the view object attribute name to be updateable or the alias name of the entity object in the view object has to be displayed with, every time.
    I didn't check if the info is displayed every tiem, may be it is a workaround !?
    Hope you understand what I mean. Thank you.

  • LOV with multiple display attributes configurable?

    I have an LOV that has 2 display attributes. Say, Person Name and Job Name. When I use autosuggest on this LOV, I also see the job name along side of the person name in the suggested names list. Can I make this configurable? I want to hide the job name at one instance and sometimes I don't. Please advice

    Hi,
    you can create your own method of suggestedItems
    <af:autoSuggestBehavior suggestedItems="#{yourBean.getSuggestedItems}"/>
    public List<SelectItem> getSuggestedItems(String value) {
    //here you construct a list that you return like suggestion
    }

  • [svn] 4241: A collection of minor fixes for FXG transcoding to SWF: matrix attribute name correction; allowing for 0x prefix for hexadecimal colors; allowing for an id attribute on FXG nodes; fixing blur filter quality encoding; fixing the order in which

    Revision: 4241
    Author: [email protected]
    Date: 2008-12-05 11:00:45 -0800 (Fri, 05 Dec 2008)
    Log Message:
    A collection of minor fixes for FXG transcoding to SWF: matrix attribute name correction; allowing for 0x prefix for hexadecimal colors; allowing for an id attribute on FXG nodes; fixing blur filter quality encoding; fixing the order in which bevel filter colors are encoding - the SWF specification appears to have the wrong order specified; updating SwfxPrinter to display a linestyle's fillstyle (if present).
    Temporarily removing generated id attribute emitted in FXG to SWF optimization as this attribute is not present in the AS impl.
    Also updating compiler error base types to allow a rootcause to be specified for additional detail to a compiler message exception.
    QE: No
    Doc: No
    Checkintests: Pass
    Reviewer: Discussed compiler base error change with Paul.
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/CompilerException.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/EmbedEvaluator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/util/CompilerMessage.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/FXGConstants.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/AbstractFXGNode.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/dom/TextGraphicNode.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/fxg/swf/AbstractFXGGraphics.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagDecoder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/TagEncoder.java
    flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java

  • Notification activity's message must have a respond attribute name 'RESULT'

    I've created a basic approval notification using the WFSTD_APPROVAL lookup type of Approve or Reject. I have it routing so that if the document is rejected it directs to the "End" Function Activity and if the document is approved it continues on with the remaining workflow. I keep getting this error when trying to save or verify the workflow. "Notification activity's message must have a respond attribute name 'RESULT' with lookup type 'WFSTD_APPROVAL'" Can anyone please direct me as to how I would set this respond attribute or how can I get rid of the warning message?

    Hi,
    On the message (within Workflow Builder), click on the Result tab, and populate the details of the result type, display name (prompt) etc. there. This will need to match the result type of the notification.
    That should do it!
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to show Attribute name in Single line in ADF-JSPX pages

    Hi,
    I am having a issue , attribute name like "Name Of Catalog" in Brazilian-Portuguese Lang. is displaying in two lines instead of showing in one line, but it is correctly showing in English language.
    And also this issue reproducible on IE 7 browser only. Please let me know your comments on above issue.
    Thanks
    Chandrakant

    Hi John,
    I have seen some solutions like using horizontal layout, where child components are arranged in a horizontal line. No wrapping is provided when contents exceed the amount of browser space available. Is this OK to use?
    One more question is, how to enable Portuguese - Brazil Lang for pages in Jdev ? in other words, I want to see Label Text in Portuguese - Brazil Lang instead of English ?
    Thanks.
    Chandrakant

  • RE: Display default name as column input

    Hi all,
    I am using Jdeveloper 11.1.2.3.0
    I have one form in my fragment and it contains 10 fields, one createInsert button and one submit button.
    Among 10 fields i want one field has to display one defalult value,  that is, it has to display 'HRDoc' as the default value every time when i click createInsert button to insert new record.
    And rest of the fields are taking input from the user.
    Can any one help me to resolve the above requirement.
    Thanks,
    Syam

    The declarative approach is to edit the attribute in the EO and set the default value to the 'Default Vaule' field as literal (or expression if you want to calculate the default). Then for each new row you create the default value from the entity will be used until you change it in the UI or elsewhere.
    To do it programmatic, you create the EntityImpl class for the EO  select to create the 'create Method' and 'Accessors' and after calling caling the create method set the defalt value:
        // crate method of the EmployeesImpl
         * Add attribute defaulting logic in this method.
         * @param attributeList list of attribute names/values to initialize the row
        protected void create(AttributeList attributeList) {
            super.create(attributeList);
            this.setSalary(new BigDecimal(19999));
    Timo

  • Retrieving display attribute of ADF dependant dropdown

    I have implemented a dynamic dropdown in ADF where the two dropdowns are bind with the Attribute command_id.For my first dropdown the display attribute is command name.But when I am retrieving the the selected value of the 1st i am getting the command_id. please let me know how to get the commandname attribute.

    Hi
    You should loop through your ViewRowImpl object for the first list and then u can access the different attribte of the object.
    Then go through the list of attibute to get the name
    String[] arra = (o).getAttributeNames();
    for(int i =0;i<arra.length;i++){
    System.out.println(arra);
    Hope it may help you
    Regards
    Lutchumaya

  • How to retrieve attribute-names (not values)

    Hi
    I know that I can get all attributes by an XPath expression according to /AA/@* . But since I have a XML document in XMLType and when I use the "..extract( aXpath)" function, I get all the attributes of the corresponding node but as a concatenation of the values. How can I get the attributes names:
    E.G.
    AA
    BB 12.3 /BB
    CC 45.5 /CC
    /AA
    /AA/@* would return 12.345.5, but I need to know "BB" and "CC", any ideas ?

    ${applicationScope.abc}
    or if there is no attribute "abc" in page, request, or session scopes just
    ${abc}

Maybe you are looking for