How to find  xml attributes valus

var xml:XML=
<root>
<country id="0">
<states id="0_0">
<city id="0_0_0">
<village id="0_0_0_0"></village>
<village id="0_0_0_1"></village>
<village id="0_0_0_2"></village>
</city>
</states>
<states id="0_1">
</states>
</country>
<country id="1"></country>
</root>;

duplicate post.

Similar Messages

  • How to find database attribute names that correspond to page labels

    I've been tasked with creating one or more views to be used in creating reports. The users know data items by the labels on pages, not the database attribute names. So my dilemma is how to correlate the page labels to the database attributes.
    For example, there's a course details web page. It includes items labeled "Replacement Course", "Inherited Competency Update Setting" and "Attachments", among others.
    Focusing on "Inherited Competency Update Setting"... there's no database attribute called that. I've found COMPETENCY_UPDATE_LEVEL, but I don't know if that is it. And is an "inherited" one different than a non-inherited.
    I've googled about, and discovered that "Inherited Competency Update Setting" can be set by using a workflow named OTA_COMPETENCE_UPDATE_JSP_PRC and setting an attribute named HR_APPROVAL_REQ_FLAG. Further research has lead me to determine that HR_APPROVAL_REQ_FLAG is used only within the workflow system. I've found in SYS.ALL_SOURCE a package OTA_COMPETENCE_SS with a function that gets that attribute's value. It includes a query against WF_ACTIVITY_ATTR_VALUES which retrieves values of YES_DYNAMIC, APPROVAL, NO, YES or NOTIFYONLY. I've not found any code that uses the function.
    Using ALL_TAB_COLUMNS, I'd found COMPETENCY_UPDATE_LEVEL in OTA_OFFERINGS, which contains "APPROVAL" or null. So that may be what I seek, but I can't confirm it.
    I also have been unable to find the translation from "APPROVAL" to "Notification, Automatic Update after Approval" (assuming I'm correct and this is the field)
    I've found a Training Administration Technical Reference Manual for Release 11i, which contains information about the database, but I've found no corresponding document for Learning Management for 12.1 (Only installation and user guides).
    And this is many days' research to find one attribute. Which I'm not certain I've found.
    So, in this case in particular, or any case in general, how does one find the database name for an attribute, given the page label's text??
    Thank you
    Cornell

    Whoa, easier than I'd thought...
    When the page first shows up, there's the About This Page link, at the bottom, clicking it you get to the About Page.
    I noted two sections, Page Definition and Business Component References Details.
    I expanded Business Component References Details and found View Objects. There's a list of views used. I was dismayed that the views don't appear to be in the database. Of course, they're camelCased Java names of Java objects, not database names (although sometimes some of the camelCased tokens might correspond to parts of view names). They are, however, clickable and when clicked the definition shows up, and I was thinking that it would take a long while to find what I was seeking.
    But... Hit the Expand All link in Page Definition, do a find on page for the desired label, and there it is... a row with the label, view object name and attribute! Pay dirt!
    Then go to the Business Component References Details, find the View Object, click it, and there's the view :-) Find the attribute, then the table... easy peasy!
    Thank y'all again

  • How to add XML attribute to an Element using BPEL assign

    I have a request xml to a bpel process that does not contain a attribute.
    After some process I need to create this missing attribute and set a value.
    I tried using the XML fragment in the Assign Activity. But how can I create a attribute?
    This XML node to which I am trying to create an attribute is a very huge node with lot of dynamic typing(xsi:type). I can just re-create the complete xml with required nodes.
    Does any one know how I can create a xml attribute using the BPEL assign? I do not want to use the Java code in my process.
    Thanks.

    I'm bit confused about what exact problem you are facing with attributes.
    You can check accessing XML attributes in BPEL Assign @ http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#BABIHDHI from the page http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm.
    I suppose your source input has no attributes and destination has to be an xml with attribute of type xsi:type. You can use the assign activity as mentioned in above document to assign your type structure to type attribute.

  • How to display xml attributes in Layout (indesign cs2)

    Hi,
    Javascript
    Indesign CS2
    PC Version
    Any one tell me, i want to display the ids in the margin. i read xml attribute, but i didn't know how to display to the margin. Help me.

    One way of doing that is to use JDOM...
    u create an xml tree, and then output using XMLOutputter class...it will be displayed in text...im not sure if thats what u want...however, if u do want to represent it visually then u may need to draw a tree...u may use the Graphics2D for that...there are alot of ways to do such thing, and the 2 possibilities arent the best...depends on what u want...elaborate more pls.

  • How to find the Attribute Tab for 0MOVETYPE?

    Hi All,
    I am trying to create the Attributes for 0MOVETYPE as per T156HT table. I am not able to find the Attribute tab. Please can you suggest me how to get T156HT data using Generic Datasource structure in BW or Is there any way to get R/3 structure in BW?
    Regards,
    Kiran

    T156HT is text table.
    You need to load only text ? It doesnt have any attibute.
    Go to RSD1
    Give your infoobject name.Check under master data/text tab if you have ticked "Text".
    You can create generic text datasource using table RSO2.
    Hope this helps.

  • How to find view attribute is from entity attribute programatically

    Guys,
    How to find if a specfic view attribute is from entity attribute programatically?

    Hi,
    ViewObject --> get AttributeDef("name of attribute")
    http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/StructureDef.html#getAttributeDef_int_
    AttributeDef --> getAttributeKind
    http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/AttributeDef.html
    If this matches AttributeDef.ATTR_ENTITY_DERIVED then the attribute is entity based
    Frank

  • How to access XML attributes with JSTL

    Hello,
    I'm using the XML functions of JSTL. I'm trying to parse the following RSS feed.
    http://weather.yahooapis.com/forecastrss?p=USNY0996
    I can get it parsed and access the elements via JSTL, but is it possible to access the attributes of some of the elements?
    For example, how can I get the city attribute out of
    <yweather:location city="New York" region="NY" country="US" />

    Hello,
    I'm using the XML functions of JSTL. I'm trying to parse the following RSS feed.
    http://weather.yahooapis.com/forecastrss?p=USNY0996
    I can get it parsed and access the elements via JSTL, but is it possible to access the attributes of some of the elements?
    For example, how can I get the city attribute out of
    <yweather:location city="New York" region="NY" country="US" />

  • How to update xml attributes as multiple rows

    I am new to this technology, but i need to show the result
    in xml document i have to update these attributes get from Databse utility class.
    <equipment object="" manufacturer="" part_number="" type="" model="" items="" accessories="">
    <equipment object="" manufacturer="" part_number="" type="" model="" items="" accessories="">By using XSLT Doucment i have to show this in table format multiple rows of data.
    I'll be happy if anyone tell me the example.

    Now the changed data must be exported back into the XML file, meaning that the content of certain elements must be updated. How can this be done with XSLT?
    XSLT approach:  check these online tutorial
    http://www.xml.com/pub/a/2000/08/02/xslt/index.html
    http://www.xml.com/pub/a/2000/06/07/transforming/index.html
    ABAP approach:
    for example you have the xml (original) in a string called say xml_out .
    data: l_xml  type ref to cl_xml_document ,
            node type ref to if_ixml_node  .
    create object l_xml.
    call method l_xml->parse_string
      exporting
        stream = xml_out.
    node = l_xml->find_node(
        name   = 'IDENTITY'
       ROOT   = ROOT
    l_xml->set_attribute(
        name    = 'Name'
        value   = 'Charles'
        node    = node
    (the above example reads the element IDENTITY and sets attribute name/value to the same)
    like wise you can add new elements starting from IDENTITY using various methods available in class CL_XML_DOCUMENT
    so how do I access the XML file in order to update it?
    you have already read this XML into a ABAP variable right?
    Sorry couldnt understand your whole process, why do you need to read local XML file?
    Raja

  • How to Get xml Attribute value from a given  xpath

    i'm building an xml from 3 columns a,b,c using 'SELECT EXTRACT (XMLELEMENT ("ROOT",.........)'
    and my xml looks something like this
    <ROOT>
    <categories>
    <catogory value="col a value" display="true"/>
    <catogory value="col b value" display="false"/>
    <catogory value="col c value" display="false"/>
    </categories>
    <DATAS>
    </DATA>
    </ROOT>
    now under the datas node i want to use xpath like this
    (case when '/root/categories/catogory/[@display="true"]' then '/root/categories/catogory/@value' else 0 end)
    so tat i get values under data node based on display attributes.... is it possible..
    if not is ther any alternative way of using xpath

    What version of Oracle (4 digits)?
    Are you trying to populate the Data node when you are building the XML originally via your SQL/XML statement or are you talking about modifying some existing XML to add more nodes to it based on data in the XML already?

  • How to add xml attributes

    I have a new requirement, where I need to write the query dynamically.
    Actually I have a table where there is a column which contains name of the tables which are modified.
    So I need to select from those tables only.
    It will be like
    FOR j IN (SELECT table_name FROM T_SYNC_PNO2_PEGA WHERE case_id=i.case_id)
    LOOP
    loops through tables for a case.
    getting the query dynamically for a specific table for a specific case
    v_sql:='select * from '||j.table_name||' where case_id='||i.case_id;
    Here I need to get the output of the above query in xml format. There will have to be xmlattributes.
    End loop;
    Please tell me how will I do it.
    The output will be like:
    <?xml version="1.0"?>
    <ROWSET>
    <Case repeating index="1">
    <CASE_ID>970200</CASE_ID>
    <STATUS>CLO
    SED</STATUS>
    <RESOLUTION>Charge Off Booked</RESOLUTION>
    </Case>
    <Case repeating index="2">
    <CA
    SE_ID>970670</CASE_ID>
    <STATUS>CLOSED</STATUS>
    <RESOLUTION>Immediate Denial<
    /RESOLUTION>
    </Case>
    <Case repeating index="3">
    <CASE_ID>980030</CASE_ID>
    <STATUS>CLOSED</STAT
    US>
    <RESOLUTION>Total Avoidance</RESOLUTION>
    </Case>
    </ROWSET>

    I have a new requirement, where I need to write the query dynamically.
    Actually I have a table where there is a column which contains name of the tables which are modified.
    So I need to select from those tables only.
    It will be like
    FOR j IN (SELECT table_name FROM T_SYNC_PNO2_PEGA WHERE case_id=i.case_id)
    LOOP
    loops through tables for a case.
    getting the query dynamically for a specific table for a specific case
    v_sql:='select * from '||j.table_name||' where case_id='||i.case_id;
    Here I need to get the output of the above query in xml format. There will have to be xmlattributes.
    End loop;
    Please tell me how will I do it.
    The output will be like:
    <?xml version="1.0"?>
    <ROWSET>
    <Case repeating index="1">
    <CASE_ID>970200</CASE_ID>
    <STATUS>CLO
    SED</STATUS>
    <RESOLUTION>Charge Off Booked</RESOLUTION>
    </Case>
    <Case repeating index="2">
    <CA
    SE_ID>970670</CASE_ID>
    <STATUS>CLOSED</STATUS>
    <RESOLUTION>Immediate Denial<
    /RESOLUTION>
    </Case>
    <Case repeating index="3">
    <CASE_ID>980030</CASE_ID>
    <STATUS>CLOSED</STAT
    US>
    <RESOLUTION>Total Avoidance</RESOLUTION>
    </Case>
    </ROWSET>

  • How to find which attribute in the view object is dirty

    Hi all,
    I am using Jdev 11.1.2.2
    I am using this code to find if a data control is dirty
    iterator.getDataControl().isTransactionDirty();
    But is there a way to find out which attribute is dirty ?
    Thanks in advance

    Never tried but give this a try.
    1. Invoke ViewAttributeDefImpl[] VO.getViewAttributeDefImpls().
    2. For each ViewAttributeDefImpl, invoke isDirty().
    You may need to expose a VO method to make this accessible in view layer, if this works.

  • How to find xml file

    I am trying to move my iTunes Library from one external HD to another.  My iTunes Library always opens when I click on the iTunes icon.  When I drag this icon over to my new external HD and after it is completely moved over I then try to open by holding the option key then clicking the new external HD and try to open it up it simply says no iTunes Library found.  Why does it open up on the old external HD simply by click the one iTunes icon but when it is transferred over to the other HD it does not open but just says there is no iTunes Library??  This is very frustrating as the only way to find out if the transfer was successful was to wait 5 hours for 14,000 songs to be transferred.  Doesn't the xml file have to be attached to my iTunes Library?  If so, why would it open on one external HD and not the other?  This is very confusing.  Help!

    I am trying to move my iTunes Library from one external HD to another.  My iTunes Library always opens when I click on the iTunes icon.  When I drag this icon over to my new external HD and after it is completely moved over I then try to open by holding the option key then clicking the new external HD and try to open it up it simply says no iTunes Library found.  Why does it open up on the old external HD simply by click the one iTunes icon but when it is transferred over to the other HD it does not open but just says there is no iTunes Library??  This is very frustrating as the only way to find out if the transfer was successful was to wait 5 hours for 14,000 songs to be transferred.  Doesn't the xml file have to be attached to my iTunes Library?  If so, why would it open on one external HD and not the other?  This is very confusing.  Help!

  • How to convert XML attributes to CSV format at receiver?

    Hi,
    I have xml file.
    <x>
       <A a=1 b=1 c=2 d=4>
           <B b=1 e=4 f=5>1.2</B>
           <B b=5 e=6 f=5>1.001</B>
           <B b=7 e=4 f=5>1.2000</B>
       </A>
    </x>
    I need to convert it to csv format file.Can anyone help me on this?
    Thanks,
    Pachika.

    HI all,
    Please ignore this I given in detail problem in next thread.

  • How to write XML with attributes to a table in Oracle?

    I tried to find solutions over the internet. Some of the stuff I looked at:https://forums.oracle.com/thread/2182669 http://www.club-oracle.com/forums/how-to-insert-data-from-xml-to-table-t2845/
    In all these cases, the solution considers XML structure with only nodes and child nodes but not attributes. In fact, one of the solutions suggests transforming the XML into a canonical form with only nodes w/o attributes.
    This is a sample of xml structure I am working with:
    Sample XML
    <rep type="P" title="P List"> <as> <a id="3" /> <a id="4" /> </as> </rep>
    I am working with oracle client 11.2 and SQL developer
    My question is: how to write XML data into a table with attributes also as column values, beside the nodes?

    My question is: how to write XML data into a table with attributes also as column values, beside the nodes
    The question you should be asking is : "how do I access attributes in the XPath language?"
    and the answer to that is easily found in any XPath tutorial you may find over the Internet, it is not related to Oracle in particular.
    Short answer : you use an "attribute::" axis before the attribute name, or more commonly a "@", e.g. @type, @id etc.
    Using the method described in the first link, something like this will extract the root attributes :
    SELECT x.*
    FROM XMLTable(
           '/rep'
           passing <xmltype variable/column goes here>
           columns type  varchar2(1)  path '@type'
                 , title varchar2(30) path '@title'
    ) x ;
    For deeper levels, use additional XMLTable calls as described in the mentioned post.

  • How to read an attribute of an xml tag in jsp.

    hi guys,
    This is murali krishna. i have a small problem,
    i have one xml file (books.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <library>
    <book id="1">
    <name>Head First Java, 2nd Edition</name>
    <author>Kathy Sierra and Bert Bates</author>
    <publication-date>09-Feb-2005</publication-date>
    </book>
    <book id="2">
    <name>Effective Java</name>
    <author>Joshua Bloch</author>
    <publication-date>28-May-2008</publication-date>
    </book>
    <book id="3">
    <name>Java How to Program, 7th Edition</name>
    <author>Harvey M. Deitel and Paul J. Deitel</author>
    <publication-date>6-Jan-2007</publication-date>
    </book>
    </library>
    I tried to read this xml file in jsp as shown below
    <%@ page language="java" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="javax.xml.parsers.DocumentBuilder" %>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory" %>
    <%
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db =dbf.newDocumentBuilder();
    Document doc=db.parse("c:\\books.xml");
    NodeList nl = doc.getElementsByTagName("book");
    %>
    <html>
    <head>
    <title>How to read XML file in JAVA</title>
    </head>
    <body>
    <%
    for(int i=0;i<nl.getLength();i++)
    NodeList nameNlc= doc.getElementsByTagName("name");
    Element nameElements=(Element)nameNlc.item(i);
    String nameTagValue=nameElements.getChildNodes().item(0).getNodeValue();
    NodeList authorNlc= doc.getElementsByTagName("author");
    Element authorElements=(Element)authorNlc.item(i);
    String authorTagValue=authorElements.getChildNodes().item(0).getNodeValue();
    NodeList dateNlc= doc.getElementsByTagName("publication-date");
    Element dateElements=(Element)dateNlc.item(i);
    String dateTagValue=dateElements.getChildNodes().item(0).getNodeValue();
    out.println("name :"+nameTagValue+"<br>");
    out.println("author :"+authorTagValue+"<br>");
    out.println("publication-date :"+dateTagValue+"<br><br>");
    %>
    </body>
    </html>
    so, my problem is I was unable to read the attribute of the tag book , that is "id".
    can any one tell me how to read this "id" attribute.
    Murali Krishna
    [email protected]

    hi,
    U r retriving the elements by tag name.So it just chks the tag name ie.<book> & gives u array of elements.But u need retrive d attribute of <book> tag itself.
    =Solution =====
    Add one more statement ----> var[]= doc.getElementsByName("book");
    Now u hav book elements as an array & can retrive id in for loop
    for(var; var.length;var++)
    doc.element[var].id.value

Maybe you are looking for

  • MBA (mid-2012) SSD failure after 8 weeks Hardware Test

    Brand new MBA mid-2012 (8GB RAM, 128GB SSD running ML 10.8.0). Failed to startup - Apple logo on grey screen appeared, then the spinning gear wheel, then a blank screen, then the spinning gear wheel, then a blank screen, repeating ad nauseum... I res

  • Email bursting 1 to many users

    Dear All, We are currently in BI 7.0 SP19. We need to send out the BI reports to many users (SAP & non-SAP users) by using the IB-email bursting "filter document by characteristic value". However, we only able to specify 1 e-mail address per country

  • USB MIDI devices not detected under OS 10.5.2

    Leopard's Audio Midi Configuration doesn't detect my Korg microKontrol, Novation Remote Zero SL and my Evolution MK-249C2 MIDI keyboard. Firewire MIDI device is detected (RME fireface 800). Using the "latest" drivers - Novation Automap Universal 2.0.

  • J2EE Admin Tool

    Hi all1 i'm working with J2EE Engine version 6.30 but its installed on a remote server, and i want to acces with the J2EE admin tool from mi pc, i have the J2EE admin 6.40 and when i'm trying to connect to the J2EE Engine 1rs gives a wraning: 'Warnin

  • IOS 5.1 update on iPhone 4 and wifi issues?

    Basicly i updated my iPhone 4 to the latest software (iOS 5.1) and every since then i have nothing but trouble previous networks i was able to connect with are either not showing up or only showing up when im within 2 feet of the router. I have tryed