Extract nested xml attributes from plsql

Hi, I need to extract from xml file and insert into 2 oracle tables. The xml file is using attributes and I am having trouble retrieving the nested "code" element with its attributes in context of its parent "table" element. Here is a sample of the xml I have to extract the date from:
<?xml version="1.0" encoding="UTF-8"?>
<dataset-cv:dataset-cv dateProduced="2011-09-19 11:50:45" xmlns:dataset-cv="http://www.myurl.com/dataset-cv/1.0.0">
<lov>
<table id="00000000000001000" englishName="System Role" isSystem="true" status="Enabled">
<code id="00000000000000306" englishName="Helpdesk" code="1" status="Enabled"/>
<code id="000000000000000307" englishName="Reviewer" code="2" status="Enabled"/>
<code id="00000000000000308" englishName="Administrator" code="3" status="Enabled"/>
</table>
<table id="00000000000002000" englishName="Country" sSystem="false" status="Enabled">
<code id="000000000000002004" englishName="AFGHANISTAN" code="4" status="Enabled"/>
<code id="000000000000002008" englishName="ALBANIA" code="8" status="Enabled"/>
<code id="000000000000002010" englishName="ANTARCTICA" code="10" status="Enabled"/>
</table>
</lov>
</dataset-cv:dataset-cv>
I have been trying to use a query like this but does not retrieve code attributes in context of its parent table record.
SELECT ID, englishname, frenchname,status ,code
FROM XMLTABLE ( 'for $i in //lov//table return $i'
PASSING db_get_xml_from_file ('myfile.xml', 'XMLORADIR')
COLUMNS id VARCHAR2(32) PATH '@id'
, englishName VARCHAR2(32) PATH '@englishName'
, frenchName VARCHAR2(32) PATH '@frenchName'
, status VARCHAR2(6) PATH '@status'
, code VARCHAR2(6) PATH '//code//code') ;
Any assistance will be much appreciated
Thanks
Dave

Hi Dave,
Do you want something like this :
SQL> SELECT x1.id
  2       , x1.englishName
  3       , x1.frenchName
  4       , x1.status
  5       , x2.*
  6  FROM XMLTable(
  7         XMLNamespaces('http://www.myurl.com/dataset-cv/1.0.0' as "dc")
  8       , '/dc:dataset-cv/lov/table'
  9         passing xmltype(bfilename('TEST_DIR','myfile.xml'),nls_charset_id('AL32UTF8'))
10         columns
11           id          VARCHAR2(32) path '@id'
12         , englishName VARCHAR2(32) path '@englishName'
13         , frenchName  VARCHAR2(32) path '@frenchName'
14         , status      VARCHAR2(6)  path '@status'
15         , codes       XMLType      path 'code'
16       ) x1
17     , XMLTable(
18         '/code'
19         passing x1.codes
20         columns
21           codeId          VARCHAR2(32) path '@id'
22         , codeEnglishName VARCHAR2(32) path '@englishName'
23         , codeStatus      VARCHAR2(6)  path '@status'
24         , code            NUMBER       path '@code'
25       ) x2
26  ;
ID                               ENGLISHNAME                      FRENCHNAME                       STATUS CODEID                           CODEENGLISHNAME                  CODESTATUS       CODE
00000000000001000                System Role                                                       Enable 00000000000000306                Helpdesk                         Enable              1
00000000000001000                System Role                                                       Enable 000000000000000307               Reviewer                         Enable              2
00000000000001000                System Role                                                       Enable 00000000000000308                Administrator                    Enable              3
00000000000002000                Country                                                           Enable 000000000000002004               AFGHANISTAN                      Enable              4
00000000000002000                Country                                                           Enable 000000000000002008               ALBANIA                          Enable              8
00000000000002000                Country                                                           Enable 000000000000002010               ANTARCTICA                       Enable             10
6 rows selected

Similar Messages

  • How to  extract  master data  attribute from  r/3 to bw give steps details

    how to  extract  master data  attribute from  r/3 to bw give steps details screenshots

    Hi
    Go through the below process to extract Master Data Attribute from R/3
    Hi,
    Maintaining Generic DataSources
    Use
    Regardless of the application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any transparent table, database view or SAP Query InfoSet, or using a function module. This allows you to extract data generically.
    Procedure
    Creating Generic DataSources
    1. Select the DataSource type and specify a technical name.
    2. Choose Create.
    The screen for creating a generic DataSource appears.
    3. Choose the application component to which you want to assign the DataSource.
    4. Enter the descriptive texts. You can choose any text.
    5. Select the datasets from which you want to fill the generic DataSource.
    a. Choose Extraction from View if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the database view or transparent table.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
    b. Choose Extraction from Query if you want to use a SAP Query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    Notes on Extraction Using SAP Query
    After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
    c. Choose Extraction Using FM if you want to extract data using a function module. Enter the function module and extraction structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    Interface Description and Extraction Process
    For information about the function library, see the ABAP Workbench: Tools documentation.
    d. With texts you also have the option of extracting from fixed values for domains.
    6. Maintain the settings for delta transfer, as required.
    7. Choose Save.
    When performing extraction, note SAP Query: Assigning to a User Group.
    Note when extracting from a transparent table or view:
    If the extraction structure contains a key figure field that references a unit of measure or a currency unit field, this unit field has to be included in the same extraction structure as the key figure field.
    A screen appears on which you can edit the fields of the extraction structure.
    8. Edit the DataSource:
    &#9675; Selection
    When you schedule a data request in the BI scheduler, you can enter the selection criteria for the data transfer. For example, you can determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extraction structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
    &#9675; Hide field
    You set this indicator to exclude an extraction structure field from the data transfer. The field is no longer available in BI when you set the transfer rules or generate the transfer structure.
    &#9675; Inversion
    Reverse postings are possible for customer-defined key figures. Therefore inversion is only active for certain transaction data DataSources. These include DataSources that have a field that is marked as an inversion field, for example, the update mode field in DataSource 0FI_AP_3. If this field has a value, the data records are interpreted as reverse records in BI.
    If you want to carry out a reverse posting for a customer-defined field (key figure), set the Inversion indicator. The value of the key figure is transferred to BI in inverted form (multiplied by –1).
    &#9675; Field only known in exit
    You can enhance data by extending the extraction structure for a DataSource by adding fields in append structures.
    The Field Only Known in Exit indicator is set for the fields of an append structure; by default these fields are not passed to the extractor from the field list and selection table.
    Deselect the Field Only Known in Exit indicator to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list and in the selection table.
    9. Choose DataSource ® Generate.
    The DataSource is saved in the source system.
    Maintaining Generic DataSources
    &#9679; Change DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component or change the texts of a DataSource. Double-click on the name of the table, view, InfoSet or extraction structure to get to the appropriate maintenance screen. Here you make the changes to add new fields. You can also completely swap transparent tables and database views, though this is not possible with InfoSets. Return to DataSource maintenance and choose Create. The screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource ® Generate.
    If you want to test extraction in the source system independently of a BI system, choose DataSource ® Test Extraction.
    &#9679; Delta DataSource
    On the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the corresponding query. If you want to delete a DataSource, make sure it is not connected to a BI system.
    NR

  • Nested XML structure from Oracle

    Using the SQL Adapter i BizTalk, calling a SQL Stored procedure on a MS SQL DB, I can get a nice nested XML structure using p JOIN ii and FOR XML AUTO, like this
    <p code="DK003">
    <ii stamp="2013-01-14T10:27:38.790"value="180.702052"price="184.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    <ii stamp="2013-01-14T10:27:38.790"value="181.702052"price="14.000000">
    <d Dividend="2.50"DividendDate="2012-03-29T00:00:00" />
    </ii>
    </p>
    How can I get the same on Oracle ??

    Hi E.,
    I guess this an XML namespace issue. I'm creating XmlForms-style documents and had to add an XML namespace to my root element to make them visible as such:
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.addNamespaceDeclaration(xf);
    So what I'd suggest to you is reading out the IResource and treating the content as XML:
    Document document = new  SAXBuilder().build(content.getInputStream());
    Element root = document.getRootElement();
    Namespace xf = Namespace.getNamespace("xf", "http://www.sapportals.com/wcm/app/xmlforms");
    root.removeNamespaceDeclaration(xf);
    Hope this helps!
    regards,
    Christian

  • Read XML attributes from RSS internet link

    I am very new to LabVIEW, and I am trying to determine the best way to read information an RSS link. Specfically, I would like to read data from a Yahoo! Weather RSS like http://weather.yahooapis.com/forecastrss?w=2502265. I would like to extract the temperature from <yweather: condition temp="[##]>, the wind speed from <yweather:wind speed="[##]">, and the text description from <yweather:condition text="[text]".
    I have looked into some XML parsing solutions like EasyXML, but I wonder if they are too much for what may be a simple task. I would appreciate any input on my current problem. Thanks.

    Howdy,
    It looks like EasyXML would make you life a little easier. You can search the LabVIEW Example Finder (Help menu->Find Examples) for XML examples. Other than that you would have to navigate to the website and parse the website source and use the LabVIW String Functions.
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Xml error from PLSQL Generator

    Hello,
    I followed the instruction (http://download-east.oracle.com/docs/cd/B25221_04/portal.1013/b25601/pdg_pdk_plsql.htm#CHDCEJGB) and installed OC4J and PL/SQL Generator. When I use the sample provider.xml code with PL/SQL Generator, I received the below "500 Internal Server Error", anyone, any ideas how can I go about fix it? Any help is appreciated!!!
    Thanks!
    500 Internal Server Error
    oracle.classloader.util.AnnotatedNoClassDefFoundError:      Missing class: oracle.webdb.utils.SimpleStringBuffer     Dependent class: oracle.portal.pdk.MultipartInputStreamHandler     Loader: plsqlgenerator.web.plsqlgenerator:0.0.0     Code-Source: /C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar     Configuration: WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\libThe missing class is not available from any code-source or loader in the system.     at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2051) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1665) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1621) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1606) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap]     at oracle.portal.pdk.MultipartInputStreamHandler.readLine (MultipartRequest.java:736) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at oracle.portal.pdk.MultipartRequest.readRequest (MultipartRequest.java:329) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at oracle.portal.pdk.MultipartRequest.<init> (MultipartRequest.java:153) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at script.jspService (_script.java:54) [C:/product/10.1.3/OracleAS_2/j2ee/home/application-deployments/plsqlgenerator/plsqlgenerator/persistence/_pages/ (from *.jsp in C:\product\10.1.3\OracleAS_2\j2ee\home\application-deployments\plsqlgenerator\plsqlgenerator\persistence\_pages), by plsqlgenerator.web.plsqlgenerator.jsp8522252:0.0.0]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service (OrionHttpJspPage.java:59) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspPageTable.service (JspPageTable.java:416) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspServlet.internalService (JspServlet.java:478) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspServlet.service (JspServlet.java:401) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by api:1.4.0]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:719) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:376) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:870) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:451) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run (AJPRequestHandler.java:299) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run (AJPRequestHandler.java:187) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap]

    Hello,
    I followed the instruction (http://download-east.oracle.com/docs/cd/B25221_04/portal.1013/b25601/pdg_pdk_plsql.htm#CHDCEJGB) and installed OC4J and PL/SQL Generator. When I use the sample provider.xml code with PL/SQL Generator, I received the below "500 Internal Server Error", anyone, any ideas how can I go about fix it? Any help is appreciated!!!
    Thanks!
    500 Internal Server Error
    oracle.classloader.util.AnnotatedNoClassDefFoundError:      Missing class: oracle.webdb.utils.SimpleStringBuffer     Dependent class: oracle.portal.pdk.MultipartInputStreamHandler     Loader: plsqlgenerator.web.plsqlgenerator:0.0.0     Code-Source: /C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar     Configuration: WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\libThe missing class is not available from any code-source or loader in the system.     at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2051) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1665) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1621) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1606) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]     at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap]     at oracle.portal.pdk.MultipartInputStreamHandler.readLine (MultipartRequest.java:736) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at oracle.portal.pdk.MultipartRequest.readRequest (MultipartRequest.java:329) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at oracle.portal.pdk.MultipartRequest.<init> (MultipartRequest.java:153) [C:/product/10.1.3/OracleAS_2/j2ee/home/applications/plsqlgenerator/plsqlgenerator/WEB-INF/lib/generator.jar (from WEB-INF/lib/ directory in C:\product\10.1.3\OracleAS_2\j2ee\home\applications\plsqlgenerator\plsqlgenerator\WEB-INF\lib), by plsqlgenerator.web.plsqlgenerator:0.0.0]     at script.jspService (_script.java:54) [C:/product/10.1.3/OracleAS_2/j2ee/home/application-deployments/plsqlgenerator/plsqlgenerator/persistence/_pages/ (from *.jsp in C:\product\10.1.3\OracleAS_2\j2ee\home\application-deployments\plsqlgenerator\plsqlgenerator\persistence\_pages), by plsqlgenerator.web.plsqlgenerator.jsp8522252:0.0.0]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service (OrionHttpJspPage.java:59) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspPageTable.service (JspPageTable.java:416) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspServlet.internalService (JspServlet.java:478) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.jsp.runtimev2.JspServlet.service (JspServlet.java:401) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by api:1.4.0]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:719) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:376) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:870) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:451) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run (AJPRequestHandler.java:299) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.AJPRequestHandler.run (AJPRequestHandler.java:187) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [C:/product/10.1.3/OracleAS_2/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_2\j2ee\home\oc4j.jar), by oc4j:10.1.3]     at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap]

  • [CS5 - JS] Setting XML attributes from variables...

    Hi,
    I build an XML variable in order to store informations I need to run my script.
    The XML structure is quite simple:
    var document = new XML("<document><pages><page/></pages></document>");
    All "page" nodes are appended using a simple for statement.
    If I need to append an attribute to a "page" node I usually use this method:
    document.pages.page.@height= 210;
    What if I need to append an attribute without knowing its name (because it is stored in a variable)?
    Is there a something like this?:
    document.pages.page.setAttribute(var_name, 210);
    Have no idea how to handle this...

    Try this:
    document.pages.page['@'+var_name] = 210;
    @+
    Marc

  • Set XML attribute from SetValue using Xpath

    Is there a trick to assigning a value to an attribute of an element in an XML variable using XPATH inside a setValue activity?  When I try something like
    Location
    /process_var/xml_var/test/@ID
    Expression:
    /process_var/test_value
    it complains about the @ sign in the location assignment.  I seem to be able to retrieve attributes just fine.

    Still having this issue.
    If I have an XML process variable which currently contains
    <Document>
        <Title />
        <Author />
        <Date />
    </Document>
    Try this, it fails.
    Location: /process_data/xml/Document/@ID
    Expression: 54
    Try this, it works.
    Location: /process_data/xml/Document/ID
    Expression: 54
    Now, alter the XML by adding an ID attribute
    <Document ID="">
        <Title />
        <Author />
        <Date />
    </Document>
    Try this, it works, where it failed earlier.
    Location: /process_data/xml/Document/@ID
    Expression: 54
    It appears to me, you can ADD a new node, but you can't ADD an attribute

  • Generate xml file from plsql ..

    Hi,
    I am using oracle 9i.
    I have written a script to generate o/p in text file . Its working fine to generate text file.
    I wish to create xml file for the same output. How to do this ??
    declare
    emp_rec emp%ROWTYPE;
    file_id UTL_FILE.FILE_TYPE;
    BEGIN
    file_id := utl_file.FOPEN ('C:\test','test.html','w');
    FOR emp IN (SELECT empno,ename FROM emp)
    LOOP
    utl_file.PUT_LINE( file_id, emp.empno );
    utl_file.PUT_LINE( file_id, emp.ename );
    END LOOP;
    utl_file.fCLOSE(file_id);
    END;
    --- Desired output ---
    <?xml version="1.0" encoding="utf-8" ?>
    <Start>
    <Row>
    <EName>SMITH</EName>
    <EMPNO>7369</EMPNO>
    </Row>
    <Row>
    <EName>SMITH</EName>
    <EMPNO>7499</EMPNO>
    </Row>
    <Row>
    <EName>ALLEN</EName>
    <EMPNO>7521</EMPNO>
    </Row>
    </Start>
    declare
    emp_rec emp%ROWTYPE;
    file_id UTL_FILE.FILE_TYPE;
    BEGIN
    file_id := utl_file.FOPEN ('C:\test','test.html','w');
    FOR emp IN (SELECT empno,ename FROM emp)
    LOOP
    utl_file.PUT_LINE( file_id, emp.empno );
    utl_file.PUT_LINE( file_id, emp.ename );
    END LOOP;
    utl_file.fCLOSE(file_id);
    END;
    Pls guide.

    Michael,
    I've some problem regarding execution of your process -
    satyaki>ed
    Wrote file afiedt.buf
      1  declare
      2    ctx integer := dbms_xmlgen.newcontext('select ename "EName", empno from emp');
      3  begin
      4    dbms_xmlgen.setRowTag(ctx, 'Row');
      5    dbms_xmlgen.setRowSetTag(ctx, 'Start');
      6    dbms_xslprocessor.clob2file(dbms_xmlgen.getxml(ctx), 'c:\', 'Test.xml');
      7* end;
    satyaki>/
      dbms_xslprocessor.clob2file(dbms_xmlgen.getxml(ctx), 'c:\', 'Test.xml');
    ERROR at line 6:
    ORA-06550: line 6, column 3:
    PLS-00201: identifier 'DBMS_XSLPROCESSOR.CLOB2FILE' must be declared
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    satyaki>Why is it throwing error?
    Is this because of lack of privs? Or anything else?
    Regards.
    Satyaki De.

  • Problem In Extracting xml file from Zip File

    Hi,
    In my application I am creating a zip file which contains some xml files. I am using Weblogic 8.1 for my application.
    When I try to extract the xml file from the zip file it displays error and those xml files are not extracted from the zip file.
    Otherwise on tomcat it works absolutely fine.
    Is there any support issues of using the zip files with weblogic?
    Please respond.
    Thanks in Advance.

    Friends
    I resolved the problem
    just to add the jars of
    mail.jar and activation.jar in the client side.
    regards
    ashok

  • Reading Xml file from clob column in the staging table

    Hi,
    I am trying to poll the staging table with the database adapter which has CLOB column type containing XML file. How do I extract the XML file from CLOB and map the fields to the another variable with definite schema.
    Thanks,
    Edited by: chaitu123 on Sep 20, 2009 8:16 AM

    1) when you create DBAdapter on a table which having the clob column watch closely the created xsd for the DBAdapter the clob cloumn element should be a String data type
    2) create xsd for Xml File and create variable for the xsd element
    3) use ora:parseEscapedXML("yourDBAdapterclobElement") to XmlFileVarilable
    Krishna

  • XML attributes as a response

    My skills are rudimentary, I'm a new flex developer. I have
    done all of the tutorials and examples and I'm just struggling with
    using an XML attribute checking a response.
    I've written a simple flex 3 app to talk to Asterisk AJAM.
    I'm writing the login piece-- and i'm having trouble parsing this
    response from an http service (successful login) my problem comes
    in with the value not being as such
    <item>valuehere</item> it's part of the tag, an
    attribute i would suppose.:
    <ajax-response>
    <response type="object" id="unknown">
    <generic response="Success" message="Authentication
    accepted"/>
    </response>
    </ajax-response>
    What I have is a simple app with a http service and a login
    form. I have an event handler for the HTTP service, but I don't
    know how to parse for that generic response tag. Anyone know how to
    format an XML object for that type of response and throw a simple
    if statement looking for that attribute?
    Failure looks like this BTW:
    <ajax-response>

    <response type="object" id="unknown">
    <generic response="Error" message="Authentication
    failed"/>
    </response>
    </ajax-response>
    Thank you,
    Brian

    I've came up with the following code trying to use XML
    attributes from the response above--- it doesn't work but here is
    what I have (right now the if statement is commented out.... i'm
    trying to have it do an alert which doesn't work either):
    ---source---
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:states>
    <mx:State name="Logged In">
    <mx:SetProperty target="{panel1}" name="width"
    value="95%"/>
    <mx:SetProperty target="{panel1}" name="height"
    value="95%"/>
    <mx:RemoveChild target="{password}"/>
    <mx:RemoveChild target="{username}"/>
    <mx:RemoveChild target="{label1}"/>
    <mx:RemoveChild target="{Submit}"/>
    <mx:RemoveChild target="{label2}"/>
    <mx:SetProperty target="{panel1}" name="title"
    value="Once Logged In"/>
    <mx:AddChild relativeTo="{panel1}"
    position="lastChild">
    <mx:Label x="10" y="10" text="You properly
    authentictaed!"/>
    </mx:AddChild>
    <mx:AddChild relativeTo="{panel1}"
    position="lastChild">
    <mx:Label x="10" y="62" text="Label"/>
    </mx:AddChild>
    </mx:State>
    </mx:states>
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    var MyXML:XML;
    private function checkLogin(evt:ResultEvent):void
    MyXML = evt.result.channel.item;
    mx.controls.Alert.show(MyXML.@*);
    trace(MyXML.@*.toXMLString());
    /* if (MyXML.attribute(ajax-response.response.@generic) ==
    "Success") {
    if (MyXML.ajax-response.response.(@generic == "Success"))
    currentState = "Logged In";
    if (MyXML.ajax-response.response.(@generic == "Error"))
    mx.controls.Alert.show('Invalid username/password');
    ]]>
    </mx:Script>
    <mx:HTTPService id="login_user"
    result="checkLogin(event)" showBusyCursor="true" method="GET" url="
    http://72.22.224.90:8088/asterisk/mxml"
    useProxy="false">
    <mx:request xmlns="">
    <action>login</action>
    <username>
    {username.text}
    </username>
    <password>
    {password.text}
    </password>
    </mx:request>
    </mx:HTTPService>
    <mx:Panel resizeEffect="Resize" width="250" height="200"
    layout="absolute" title="Login System" horizontalCenter="0"
    verticalCenter="-2" id="panel1">
    <mx:Label x="10" y="10" text="Username:" id="label1"/>
    <mx:TextInput x="10" y="36" id="username"/>
    <mx:Label x="10" y="66" text="Password:" id="label2"/>
    <mx:TextInput x="10" y="92" id="password"
    displayAsPassword="true"/>
    <mx:Button x="10" y="122" label="Submit" id="Submit"
    click="login_user.send();"/>
    </mx:Panel>
    </mx:Application>

  • Generating Nested XML Documents

    Hi,
    We want to generate nested XML documents from sql queries using pl/sql.
    If the output of the query is
    EMPNO NAME MGRNO
    1 Super Admin 0
    2 Mgr1 1
    4 SubMgr1_1 2
    5 SubMgr2_1 2
    3 Mgr2 1
    6 SubMgr1_2 3
    then XML generated should be in the format
    Super Admin
    Mgr1
    SubMgr1_1
    SubMgr2_1
    Mgr2
    SubMgr1_2
    Your early response is appreciated.
    Thanks.

    No, the id is not unique, it is part of the data. Also, I don't need to update the XML document.
    I store the data part (id, status, nodenum) in the "resp" table with a primary key as a combination of id and some other info. The table "nodes" will have a foreign key and multiple occurrences of node. Same with table "restricts" with multiple restrict.
    Do I need to create a DOM tree then store each part of the XML into appropriate tables? And how do I do that? (which APIs, etc.)
    Thanks,
    Thuvan

  • Extracting attributes from XML document using plsql

    Hello,
    I have successfully written a plsql procedure that has been
    using Xpath to extract the element values from an XML doument:
    i.e.
    l_xpath := '/Form_Data/Person_Details/Initials';
    l_DomNodeList := xslprocessor.SelectNodes(l_RootNode, l_xpath);
    l_DomNode := xmldom.item(l_DomNodeList,0); -- first Element
    l_DomNode := xmldom.getfirstchild(l_DomNode);
    l_id_number := xmldom.getNodeValue(l_DomNode);
    However the data (Initials) I wish to extract is now stored as
    attributes within the Person_Details element and I was wondering
    how I would go about explicitly extracting the attributes values!
    I have not been able to find any examples, although I have been
    pointed in the direction of xmldom.getattribute without any
    success!
    Any help, or code examples greatly appreciated,
    - Mark...

    example:-
    xpath.VALUEOF(i_doc,v_PricingPath||'@LockIndicator');

  • Producing nested xml with querying attributes from a nested table

    How can one produce nested xml querying columns from a nested table? Looking at the object documentation, I can readily unnest the tables. Using your examples in the book, unnesting is select po.pono, ..., l.* from purchaseorder_objtab po, table (po.lineitemlist_ntab) l where l.quantity = 2;
    what if I don't want to unnest and don't want a cursor. I would like to produce nested xml.

    Gail,
    Although you can use XSU (XML-SQL Util) in 8.1.7, I would recommend that you upgrade to 9i for much better support (both in functionality and performance) of XML in the database. For example, in Oracle9i there are:
    - a new datatype - XMLType for storing and retrieving XML documents
    - DBMS_XMLGEN package and SYS_XMLGEN, SYS_XMLAGG functions for generating XML document from complex SQL queries
    - A pipelined table function to break down large XML documents into rows.
    You can check out some examples using SYS_XMLGEN and DBMS_XMLGEN for your specific needs at http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88894/adx05xml.htm#1017141
    Regards,
    Geoff

  • Retrieve data from xml attributes

    Hi
    I used oracle xml function to query the database and return the following xml data.
    <Item    item1="1000"  item2="A"  item3="B"  />Now i would like to extract the value of item1 attribute from the above xml data. I am not sure how to retrieve the attribute data directly from this root element "Item". Any suggestion is highly appreciated.

    I resolved it myself .
    Thanks.

Maybe you are looking for

  • Bbm doesn't work on brand new 9300

    Bis works all other apps work including facebook etc by bbmt refuses to wori, need help urgently. Internet browsing episcopal techs in S.A can't help, really disappointed

  • Using two windows accounts and 1 ipod directory

    I've been trying to set up my computer so that my wife and I can log into our own windows accounts but still pull the itunes music from only one location. I have it set up so that the music gets stored in one location and each account reads the music

  • How to generate very fast pulses (single puls)

    Hi, I have a problem with generating fast pulses in LabView (2009 / 9.0, Win7-64enterprise). I try to explain my project: I have a femtosecond laser which sends pulses with a frequency of 200kHz. It mean 100fs puls 4.9999us low...100fs pulse..... The

  • Security settings for Packages Data Source

    Hello, Can someone please help me or address me to some technical advise  about the way to configure the security options of a folder designed as a Data Source for Packages (or OS Images)  to work with SCCM 2012? I'm having a lot of troubles in distr

  • Table - Data Entry?

    Hi All, I cannot find how to do this in Designer (It's a fillable PDF form). I have need of a table in which someone can add as many rows as needed for the following information: Class Number - Class Name - Class Hours I thought a table that would ad