Read an XML file with elements of namespace
I'm a beginner with XML and for the first time that I have to read a file with columns.
I try this code, but the result is always the same: no selected lines.
variable xml_response VARCHAR2 (4000)
START
: xml_response :=
'
<? XML version = "1.0" encoding = "UTF-8"? >
" < ROOT xmlns =" http://www.post.ch/schemas/DFU/2006/20/Report11 ">
< sender SenderID = SenderName "1618" = "Laurastar SA" ReportCreated = "20141120053155" >
< provider ProviderID = "539ADAEE-FF18-49F8-84B8-B90232CBCC61" ProviderName = "Consignments" >
< data >
< item SendingID = "a68f0007-c4df-4ecb-8dfe-d6da6c2e0cda" ItemID = IdentCode "5430243" = "993314781300000254" / >
< item SendingID = "beba5a0e-6363-42f1-aeb5-51c5171ed032" ItemID = IdentCode "5430241" = "993314781300000255" / >
< item SendingID = "beba5a0e-6363-42f1-aeb5-51c5171ed032" ItemID = IdentCode "5430241" = "993314781300000255" / >
< / data >
< / provider >
< / sender >
< / ROOT > ';
END;
/
SELECT x .*
FROM XMLTable ( )
'/ ROOT'
from xmltype (:xml_response)
columns
ReportCreated VARCHAR2 (30) way "Sender/@ReportCreated"
, SendingID varchar2()50() way "Sender/Provider/Data/Item/@SendingID"
, ItemID varchar2()30) way "Sender/Provider/Data/Item/@ItemID"
, IdentCode varchar2()30) way "Sender/Provider/Data/Item/@IdentCode"
) x
;
I would not find what the problem is.
I could not found what the problem is.
Two things are wrong:
(1) the lack of namespace declaration
(2) that you are trying to project expandable nodes into a single line
This should work:
SELECT x1.ReportCreated , x2.* FROM XMLTable( XMLNamespaces(default 'http://www.post.ch/schemas/dfu/2006/20/Report11') , '/ROOT/Sender' passing xmltype(:xml_response) columns ReportCreated varchar2(30) path '@ReportCreated' , items xmltype path 'Provider/Data/Item' ) x1 , XMLTable( XMLNamespaces(default 'http://www.post.ch/schemas/dfu/2006/20/Report11') , 'Item' passing x1.items columns SendingID varchar2(50) path '@SendingID' , ItemID varchar2(30) path '@ItemID' , IdentCode varchar2(30) path '@IdentCode' ) x2 ;
Tags: Oracle Development
Similar Questions
-
Generate the XML file with elements and attributes in table Oracle
Hello
I have the following table structure.
CREATE TABLE SPOOL
(
COIL_ID NUMBER (10),
COIL_NUMBER VARCHAR2 (40),
COIL_PO_OPERATING_UNIT VARCHAR2 (20).
COIL_PO_NUMBER VARCHAR2 (40),
MILL_NUMBER VARCHAR2 (2),
MILL_COIL_STATUS VARCHAR2 (15).
ITEM_NUMBER VARCHAR2 (40),
COIL_WEIGHT NUMBER (38),
WEIGHT_UOM VARCHAR2 (10),
DOCUMENT_NUMBER VARCHAR2 (40),
DATE OF DOCUMENT_DATE,
DOCUMENT_STATUS VARCHAR2 (15).
DOCUMENT_TYPE VARCHAR2 (20).
DOCUMENT_SOURCE VARCHAR2 (20).
TEST_ID NUMBER (38),
NUMBER VALUE,
TEST_UOM VARCHAR2 (20).
TEST_STATUS VARCHAR2 (70).
TESTER_LOGIN VARCHAR2 (20).
EQUIPMENT_CODE VARCHAR2 (50).
DOC_STS_MSG VARCHAR2 (600)
)
/
For each record COILID, there could be several folders baased on TEST_ID/VALUE/TEST_UOM etc.
And I would like to prepare the xml file in the following format by selecting data in the COIL?
<? XML version = "1.0"? >
-coil xsi: noNamespaceSchemaLocation = "www.tempel.com/COIL.xsd" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb = "http://xmlns.oracle.com/xdb" >
< CoilId > 1419532 < / CoilId >
< CoilNo > D2221050010A0 < / CoilNo >
Changzhou < CoilPOOperatingUnit > < / CoilPOOperatingUnit >
< CoilPONo > 4619 < / CoilPONo >
< MillNo > 86 < / MillNo >
Test of < MillCoilStatus > < / MillCoilStatus >
C5 050FP800 < ItemNo > < / ItemNo >
< weight > 7076 < / weight >
KILOGRAM of < GLU > < / UDM >
< DocumentNo > 0 < / DocumentNo >
< DocumentDate > 2013 - 01 - 11 < / DocumentDate >
< DocumentStatus > not < / DocumentStatus >
< DocumentType > test < / DocumentType >
CHIGMA1 < DocumentSource > < / DocumentSource >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4992" TestUnit = "mm" Status = 'NonProcessed' TestId = "135" / >
< test DocStsMsg = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.0128" TestUnit = "mm" Status = 'NonProcessed' TestId = "124" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "12" TestUnit = "mm" Status = 'NonProcessed' TestId = "125" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5095" TestUnit = "mm" Status = 'NonProcessed' TestId = "127" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5042" TestUnit = "mm" Status = 'NonProcessed' TestId = "128" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5058" TestUnit = "mm" Status = 'NonProcessed' TestId = "129" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4967" TestUnit = "mm" Status = 'NonProcessed' TestId = "130" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.5049" TestUnit = "mm" Status = 'NonProcessed' TestId = "131" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4972" TestUnit = "mm" Status = 'NonProcessed' TestId = "132" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4960" TestUnit = "mm" Status = 'NonProcessed' TestId = "133" / >
< DocStsMsg test = '0' EquipmentCode = "CHIGMA1" TesterLogin = "dpkrueger" Value = "0.4996" TestUnit = "mm" Status = 'NonProcessed' TestId = "134" / >
< / reel >
Can you please guide me how to do it in a single query?
Thanks in advance.Function EXTRACT will force a print in your version:
SELECT XMLElement("Coil", XMLAttributes( 'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi" , 'www.tempel.com/COIL.xsd' as "xsi:noNamespaceSchemaLocation" ) , XMLForest( COIL_ID as "CoilId" , COIL_NUMBER as "CoilNo" , COIL_PO_OPERATING_UNIT as "CoilPOOperatingUnit" , COIL_PO_NUMBER as "CoilPONo" , MILL_NUMBER as "MillNo" , MILL_COIL_STATUS as "MillCoilStatus" , ITEM_NUMBER as "ItemNo" , COIL_WEIGHT as "Weight" , WEIGHT_UOM as "UOM" , DOCUMENT_NUMBER as "DocumentNo" , DOCUMENT_DATE as "DocumentDate" , DOCUMENT_STATUS as "DocumentStatus" , DOCUMENT_TYPE as "DocumentType" , DOCUMENT_SOURCE as "DocumentSource" ) , XMLAgg( XMLElement("Tests", XMLAttributes( DOC_STS_MSG as "DocStsMsg" , EQUIPMENT_CODE as "EquipmentCode" , TESTER_LOGIN as "TesterLogin" , VALUE as "Value" , TEST_UOM as "TestUnit" , TEST_STATUS as "Status" , TEST_ID as "TestId" ) ) ) ).extract('/*') FROM coil GROUP BY COIL_ID , COIL_NUMBER , COIL_PO_OPERATING_UNIT , COIL_PO_NUMBER , MILL_NUMBER , MILL_COIL_STATUS , ITEM_NUMBER , COIL_WEIGHT , WEIGHT_UOM , DOCUMENT_NUMBER , DOCUMENT_DATE , DOCUMENT_STATUS , DOCUMENT_TYPE , DOCUMENT_SOURCE ;
-
OSB: How to read the xml file, which is in OSB project
Hello
We have a generic proxy (PG1) reporting and deals alerts, this proxy is called in the pipelines of proxies anothers (P1... PN) in several projects. Each client proxy (P1... PN) PN) before call proxy PG1, configures a variable with syntactic alert or report.
We thought it would be a good idea to store the specifications for all the proxies of a project as an xml file, so that the proxy PG could read the xml file. This file will be in the OSB project.
The questions are:
-proxy can read a xml file that is in the OSB project?
S ' Please, are all the documentation for this?
Thank you
Kind regardsYou can always do customization to work with the properties defined in a XML xquery. The key to this is to use the customization of reference instead of find and replace the customization, similar to the service account customizations.
Keep your real estate to as properties_dev of env xquery specific xmls, properties_sit etc then apply customization of service proxy xquery reference reference specific correct env. -
Hi all
I want to read an xml file and add that a large number of boxes with the names specified in xml.
Can someone please share a working code example please
Thank you
Lima
If this post answers your question or assistance, please mark it as such.
Greg Lafrance - Flex 2 and 3 certified ACE
www.ChikaraDev.com
Flex / development, training, AIR and Support Services
- check1
- check2
- check3
-
I can't read the .avi files with any program on my system.
I can't read the .avi files with any program on my system. Have several programs that all of them played before September 2010, like the classic, windows media center windows media player media player, Director of windows, windows, 5.3, video programs video ulead dvd creating toshiba. Nothing works, frustrating not being able to download videos from two different cameras and burn them on DVD. I get an error of almost all the programs, saying that it was unable to load the required component, but I can't determine what this component. I tried to reinstall the codecs again non-joy.
The free utility GSpot to identify the codec that created
a .avi file... maybe it will help solve the problem:Download GSpot
http://www.free-codecs.com/download/GSpot.htm
(left-click the text: "Download GSpot")
(on the next screen...
left click: 'Download [GSpot 2.70]')You don't have to install it... just unzip the file and
GSpot.exe left click to launch.GSpot Super quick start
http://www.headbands.com/GSpot/v26x/Quick_Start.htmlEvaluation of video files and Codecs with GSpot
http://www.windowsmoviemakers.NET/PapaJohn/68/GSpot.aspxGood luck.
-
Reading an XML file and write the content in another file xml in java
Hello
I'm new to xml parsing. My requirement is that I get a message (xml) using ibm MQ in the ByteArrayInputStream format. I read this xml message and write to another file.
To do this, I create a CEP.
First of all, I used simple reading and writing concept, but the output is "java.io.FileInputStream@3e25a5".
Example of xml file
-< customer >
< > 1234 ClientId < / ClientId >
STechnology < ClientName > < / ClientName >
< DTU_ID > 567 < / DTU_ID >
< ClientStatus > ACTIVE < / ClientStatus >
-< LEAccount >
< Customer > 678989 < / customer >
< > 56743 LEId < / LEId >
-< account >
< AccountNumber > 9876543678 < / account number >
< / account >
< / LEAccount >
-< Service >
Y2Y < Cindicator > < / Cindicator >
< PrefCode > 980 < / PrefCode >
< BSCode > 876 < / BSCode >
< MandatoryContent > MSP < / MandatoryContent >
< / service >
< / customer >
Code:
import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
to import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class ByteArrayInputStreamToXml {}
Public Shared Sub main (String [] GIS) throws IOException {}
InputStream inputStream = new FileInputStream("C:\\soft\\test2\\sample1.xml");
currentXMLBytes Byte = inputStream.toString () .getBytes ();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream (currentXMLBytes);
OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
int read = 0;
ubyte bytes [] = new byte [1024];
While ((read = byteArrayInputStream.read (bytes))! = - 1) {}
out. Write (bytes, 0, read);
out. Write ("\n");
}
inputStream.close ();
out. Flush();
out. Close();
System.out.println ("new file created!");
}
}
Please suggest me how can I use DOM/SAX parser, I see several code on the net to read the xml file using SAX/DOM parser, but write an xml file after reading using ByteArrayInputStream I don't get. Assistance through some link examples will also be useful for me.
Thank you
Sumit
Published by: user8687839 on April 30, 2012 02:37
Published by: user8687839 on April 30, 2012 02:43user8687839 wrote:
But the file is coming thanks to a queue and byte format. Must read the byte, and write to a file. So, how I tried to read the byte using the code above. Please suggest me the correct way.Simply write the bytes of the contents of the queue directly to a FileOutputStream. Still no need to SAX or DOM!
Pseudo-code-
Open a FileOutputStream . Until all the bytes of the queue have been read read some bytes from the queue. wite these bytes to the FileOutputStream. Close the FileOutputStream.
Published by: sabre150 on April 30, 2012 11:30
-
Loading the XML file with the missing elements dynamically by ODI
Hi guys,.
I have the XML with two nodes Employee and address below. On a daily basis, sometimes the address element might not come from the source xml file, but my interface has columns mapped to the elements of the address, and that is why it may fail because of the source element is not found in the file or data could not get charged because the State 'and' in the sql query that is generated between the employee and address elements. Is there a way where I can load the data dynamically where I can search in the file only for items (used) present and dynamically loading data only for these items?
XML file:
<? XML version = "1.0" encoding = "UTF-8"? >
< EMP >
< Empsch >
< employee >
< EmployeeID 12345 > < / EmployeeID >
< original > t < / initials >
John < name > < / LastName >
DOE < FirstName > < / name >
< / employee >
< address >
< > 12345 as WorkPhone < / as WorkPhone >
< WorkAddress > test 234 < / WorkAddress >
< / address >
< / Empsch >
< / EMP >
Thank you
Fabien Tambisetty
I managed to solve it by using left outer joins, and in referring to the structure of the table of the XSD
-
Reading data from an XML file with the same parent tag
We have the XML file that is stored in a CLOB column. We can typecast the CLOB to XML and access to a particular value. We cannot do the same in the case of same parent tag. We read the amount claimed for LABOUR, the FREIGHT_DUTY and MEALS. Can anyone help us.
SELECT EXTRACTVALUE (XMLTYPE.createXML (CLAIM_SNAPSHOT_STRING),'path / text () ')
IN ln_hl_labor_hrs_on_job
OF TAV_DC_031A_CLAIM_AUDIT_XML
WHERE CLAIM_AUDIT_ID = 3799;
< paymentComponents class = "dΘfinir" >
< company.domain.claim.payment.PaymentComponent >
< id > 30310 / < ID >
< version > 0 < / version >
< forCategory class = "company.domain.claim.payment.CostCategory" >
< id > 6 / < ID >
< version > 1 < / version >
Meals from < name > < / name >
< code > < code > MEALS
< description > meal < / description >
< / forCategory >
< claimedAmount >
< amount > 0.00 < / amount >
"< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >
< / claimedAmount >
< /company.domain.claim.payment.PaymentComponent >
< company.domain.claim.payment.PaymentComponent >
< id > 30311 / < ID >
< version > 0 < / version >
< forCategory class = "company.domain.claim.payment.CostCategory" >
< id > 3 < /ID >
< version > 1 < / version >
< name > work < / name >
< code > < code > WORK
< description > work < / description >
< / forCategory >
< claimedAmount >
< amount > 217.00 < / amount >
"< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >
< / claimedAmount >
< /company.domain.claim.payment.PaymentComponent >
< company.domain.claim.payment.PaymentComponent >
< id > < /ID > 30312
< version > 0 < / version >
< forCategory class = "company.domain.claim.payment.CostCategory" >
< id > 5 / < ID >
< version > 1 < / version >
< name > point freight and duty < / name >
< code > < code > FREIGHT_DUTY
< description > point freight and duty < / description >
< / forCategory >
< claimedAmount >
< amount > 0.00 < / amount >
"< reference currency ="... /... /.. /.. /.. /serviceInformation/ServiceDetail/laborPerformed/company.domain.claim.LaborDetail/laborRate/currency"/ >
< / claimedAmount >
< /company.domain.claim.payment.PaymentComponent >
< / paymentComponents >
Kind regards
Franck Giri
SQL> with t 2 as 3 ( 4 select 5 xmltype 6 ( 7 '
8 ' 54 ) xml_data 55 from dual 56 ) 57 select t1.* 58 from t 59 , xmltable 60 ( 61 '/paymentComponents/company.domain.claim.payment.PaymentComponent' passing t.xml_data 62 columns 63 code varchar2(20) path 'forCategory/code', 64 amount number path 'claimedAmount/amount' 65 ) t1; CODE AMOUNT -------------------- ---------- MEALS 0 LABOR 217 FREIGHT_DUTY 0 SQL>9 2330310 100 1112 186 131 14Meals 15MEALS
16Meals 1719 220.00 2021 24 3830311 250 2627 333 281 29Labor 30LABOR
31Labor 3234 37217.00 3536 39 5330312 400 4142 485 431 44Item Freight And Duty 45FREIGHT_DUTY
46Item Freight And Duty 4749 520.00 5051 -
Until a few days ago when I opened a file XML with Firefox, I see the content of the file appears with line breaks and ' < ' and ' / > ' and elements. Like this:
fixed image in < typeOfResource > < / typeOfResource >
<genre authority="marcgt">picture</genre> <genre authority="nmc">Print, Photographic</genre> <originInfo> <dateIssued encoding="marc">1884</dateIssued> <dateIssued encoding="marc">1884</dateIssued> <issuance>monographic</issuance> </originInfo> <language>
Now, it will display like this:
still image picture Print, Photographic 1884 1884 monographic eng electronic
No tags or line breaks. I need to see the entire XML file. How can I configure FireFox to display this for me? One of my colleagues uses v31.0 and XML views with tags and the line breaks for him.
For example, I was looking at files sitemap.xml (search Google for inurl:sitemap.xml). For those who have not declared a style sheet, you should always see the classic "source highlight: presentation
Example: http://www.website.com/sitemap.xml
Are the files that don't appear as similar planned by not declaring a style sheet?
As a temporary workaround, you can view the source to see the original. Either:
- CTRL + u
- Right click > view Page Source
-
Get the table to an XML file with several bays
Hello
So I was faced with this program I have for the past few months but I'm almost there. I have a program that creates several berries and place one after the other in an xml file, and each table has its unique name. Now, I would create a VI that takes this XML file and when the user enters the name of the table specific they are seeking it goes into the xml file concludes the table in its entirety under this name and displays in an indicator of output to be read on the VI. A sample of my xml file and the VI that creates this xml file is attached.
Thank you
dlovell
Something like this should work for you.
-
Analysis of XML file with the word &; quot; Infinity &; quot; in it
I'm having a problem in Flex that parses an XML file, one of the names in the text file contains the word "infinite". Unfortunately, it is a constant in Flex and the element of my table don't think it's a text string but a value. I tried the definition of the xml element type and by putting the characters exhaust around the text, but nothing does. If I change the text of tiny "infinite", it works fine.
Any help much appreciated.This looks like a bug. You can drop, with an example of the size of the code which illustrates, here:
Thank you!
Matt Horn
Flex docs -
Include the XML file with OTA Download
Is it possible to include an XML file generated with OTA Download? I am writing an app that will be distributed with a web application that comes with it. It must be deployed on individual sites, each with its own public address, configuration settings, etc. The config is specified through configuration of web application and then saved (and later edited/updated) in XML format in the same location as the compiled files jad/cod. This will eliminate the need for the end user specify the public address of the web application so that provide default configuration settings. It will be on BIS and HTTPS. I do not expect BES as the target users will be individuals and small businesses. I'll be providing the source if they want to make changes, but I don't want to require the end user to compile just to use "out of the box', not versions include different OS and compiled the updates I distribute the bugs/feature updates. In addition, it will access some restricted API and they must sign.
If there is another method to achieve this, I am completely open and still at the design stage of list/original feature on the BB side.
Thank you
Song
OK, I wasn't aware of this limitation (I usually code for bes )
other ideas would be:
-Configure the application mail/SMS (or similar), implement a listener for it.
-use a common server and decide what config to use during execution, (by e-mail domain, for example)
-
form2xml generate xml files with '? ' for non-Latin characters
I used form2xml in oracle 10 g costume to convert formulas 5 .fmb .xml. using the command:
frmf2xml.bat OVERWRITE = YES myform.fmb
Forms contains the set of Arabic characters, but the xml file is generated with the character "?", and the xml file is unusable ".
What can I do to keep the Arabic characters in the generated xml files.
Edit:
I run form2xml on windows xp SP3 with Arabic support (codepage = 1256)
The xml file is generated in UTF-8 format
I solved the problem.
Step 1: Search the registry for each NLS_Lang key and change its value to the codepage 1256 using regedit
Step 2: in the Panel of control-region and language, I changed the language to be Arab
Now everything is good
-
Need help to read the xml file and place it in a table.
Nice day!
Here is the configuration. I have a xml file from another source which will call a stored procedure in my database (which I am supposed to create). This is a first for me, I've never done development pl/sql or worked with xml. :(
That's what I hoped to accomplish, if there is a better way, that I am open to him.
In short, to have a stored procedure that takes the xml file (transmitted by third parties via the call, no url must be a file), creates a temporary table and populates the two columns needed. Then, the SP will make a select join with the temporary table and other data available in another schema. Once the completed table selection will be truncated and dropped. SP farm.
Details:
DB: Oracle 11.2.0.1 RAC.
Charset: AL32UTF8
Example of XML: (nearly 10,000 lines like this in production)
"< MerchantID report =" "#" name = 'Conversion detail report' ReportStartDate = '2011-09-27 12:00:00GMT' ReportEndDate = '2011-09-27 21:38:13GMT"Version ="1.1"> < Conversion = '1234567891234567 D' MerchantReferenceNumber Convertingdate =" 2011-09-27 13:39:02 "RequestID ="1234567891234567891234"> < OriginalDecision > REVIEW < / OriginalDecision > < NewDecision > ACCEPT < / NewDecision > < Reviewer > testusr < / examiner > < ReviewerComments > no reason to reject. < / ReviewerComments > < Notes > < Note Date = "2011-09-27 13:39:02" AddedBy = "testusr" comment = "Took possession" / > < / Notes > < queue > Digital Review < / queue > < profile > Digital orders QA < / profile > < / Conversion > "
...
< / report >
What I tried.
I found a tutorial: http://it.toolbox.com/blogs/oracle-guide/oracle-and-xml-in-action-a-real-world-example-5319 I tried and was able to make it work. But I could not duplicate the results with my xml file. So I looked away and have had no success. :( I'm not a developer, so I'm really bad...
I found a note of support: (how to load an XML file into a Database Table using DBMS_XMLSave unaided Bfile [227476.1 ID]) and couldn't make it work.
I found some online then Odie son xml and tried these but slipped and couldn't get my versions of these great answers to work for me.
Then... I'm here now and hoping that someone could walk me through this.
I tinkered this SP (it doesn't have to be that way, the suggestions are greatly appreciated)
create or replace procedure xml_to_table (call_1 call_2) as
Start
run immediately "CREATE GLOBAL TEMPORARY TABLE XMLType IMRPT
--(clé primaire contrainte-imrpt_pk (MerchantReferenceNumber))
XmlType store as xml binary basicfile
-(high compression)
virtual columns
(MerchantReferenceNumber as (xmlcast (xmlquery ('/ Conversion/MerchantReferenceNumber ' from object_value content back) as VARCHAR2 (32))))
, NewDecision as (xmlcast (xmlquery ('/ Conversion/NewDecision ' from object_value content back) as VARCHAR2 (10)))
)
-ON COMMIT PRESERVE ROWS
run immediately 'save xml as a file on the local system?'
insert into IMRPT (MerchantReferenceNumber, NewDecision)
run immediately "join select statement.
run immediately 'truncate table IMRPT.
run immediately "drop table IMRTP.
end;
/
On my last test, I tried to select just in the xml file using this:
DECLARE
indomdoc DBMS_XMLDOM. DOMDocument;
innode DBMS_XMLDOM. DOMNode;
myParser DBMS_XMLPARSER.parser;
buf VARCHAR2 (2000);
BEGIN
myParser: = DBMS_XMLPARSER.newParser;
DBMS_XMLPARSER.setBaseDir (myparser, 'XML_DIR');
DBMS_XMLPARSER. Parse (myParser, "test.xml");
indomdoc: = DBMS_XMLPARSER.getDocument (myParser);
-just to test content
innode: = DBMS_XMLDOM.makeNode (indomdoc);
DBMS_XMLDOM.writeToBuffer (innode, buf);
Dbms_output.put_line (BUF);
dbms_xmldom.freeDocument (indomdoc);
dbms_xmlparser.freeParser (myParser);
END;
/
It was another accident and burn.
Any help would be appreciated.
Thank youLike I said:
Here is an example using a REF CURSOR variable ( you will need to declare a plus for your actual procedure )
Your procedure has two parameters, you must declare two variables to hold the two REF CURSOR ;)
DECLARE v_filename VARCHAR2(50) := 'DMReport.xml'; v_rc1 SYS_REFCURSOR; v_rc2 SYS_REFCURSOR; v_order_name VARCHAR2(100); v_reason_text VARCHAR2(100); BEGIN xml2table(v_filename, v_rc1, v_rc2); commit; loop fetch v_rc1 into v_order_name; exit when v_rc1%notfound; dbms_output.put_line('ORDER_NAME='||v_order_name); end loop; close v_rc1; loop fetch v_rc2 into v_order_name, v_reason_text; exit when v_rc2%notfound; dbms_output.put_line('ORDER_NAME='||v_order_name||', REASON_TEXT='||v_reason_text); end loop; close v_rc2; END; /
If you test this in SQL * Plus, do not forget to SET SERVEROUTPUT ON to see the result.
-
Static load of the XML file with the list of choices
Hello
So let me explain my problem:
-J' have XML files: (in my < fx:Declaration >)
< fx:XML id = "flexang" source = "xml/flex - ang.xml" / >
< fx:XML id = "flexastro" source = "xml/flex - astro.xml" / >
< fx:XML id = "flexber" source = "xml/flex - ber.xml" / >-J' have a list constructed as follows:
(in my < fx:Declaration >)
< fx: Model id = "anim" >
States <>
< label State = data="animations/flex-ang.swf"/ "Anguinéa" >
< label State = "Retrograde motion" data="animations/flex-astro.swf"/ >
< label State = "Rod of Bérard" data="animations/flex-ber.swf"/ >
< / states >
< / fx: Model >
(and then)< mx:List id = 'source' width = '100% ', color = 'blue '.
dataProvider = "{anim.state}" "
change = "selectedListItem .selectedItem = list (event.currentTarget);" / > "(with public var selectedListItem:Object ;)
My list is designed to load dynamicaly some SWF files< mx:SWFLoader id = "animation".
source = "{selectedListItem.Data}" "
autoLoad = 'true '.
Width="100%"/ >-But now I want to display the correspondent. So I tried to build the string to the XML of the selectedListItem.data id:
private void xmlFile(swf:String):String
{
var pref:String;
var tab = swf.split (".", 2);
Tab = Tab [0]. Split("/",2);
Pref = tab [1];
Pref pref =. Split("-"). Join("");
return of pref;
}This gives me, for example, "flexang" of "animations/flex - ang.swf. But my problem is that I want to put my XML file in my region RichText:
< s:RichEditableText id = 'codeView' editable = textFlow = "{TextFlowUtil.importFromXML (xmlFile (selectedListItem.data)) 'false'}" / > "
But xmlFile returns a string! and I don't know how to specify that it is an XML ID.
I hope I am clear enough.
Thank you if you try to help me
Wait, that wasn't fair. Try:
TextFlow = "{TextFlowUtil.importFromXML (this [xmlFile (selectedListItem.data)])}
"
Maybe you are looking for
-
Manage icons in the dock?
I just download El Capitan on my MacBook Pro 10.11.4. There are icons in the dock I use and want to remove. But when I try it drag on the dock, it jumps to the dock as if it were on a spring! Advice please please?
-
Satellite A500 emit after bios update 1.50
Hey guys and girls, I have some problems after the update of the bios. Before the update my laptop has been the scene of much smoother and everything was fine and dandy until Tempro told me to update my bios. The problem is that after the update, the
-
application source Event viewer event id 1000 error
Dear, I am running windows server 2008 r2 in my business and recently started Active Directory to freezes from time to time, and im not able to use it, below that is the event that is logged in the event viewer: can you please help as im not able to
-
Compaq mini 110 c-1120sa: enter the current password
Hello When to start computer show "enter current password" then display the error code: {"fatal error... system halted. CNU94747SY"} Please help me
-
ORIGINAL TITLE: File evil When I save a file (using "Save as" in Firefox) on the Office the address bar reads: file:///C:/Users/Name/Desktop...how can I fix it?