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
Tags: Database
Similar Questions
-
Extract data from an xml file takes almost an hour to 2.5 M data.
Hello
Any help would be much appreciated. Extract data from an xml file takes almost an hour to 2.5 M. data is there a solution to this.
WITH t AS
(SELECT XMLTYPE (response) pass FROM dual
)
SELECT
b.entity_id,
c.INSTANCE_ID,
d.attribute_id,
d.DATA_TYPE,
d.ATTRIBUTE_VALUE,
d.outcome_style
T,.
XMLTABLE (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
, ' SOAP - ENV:Envelope / SOAP - ENV:Body / typ: assess-response/typ: global instance / typ:entity'
PASSAGE t.col
Path of COLUMNS entity_id VARCHAR2 (256) "@id".
path XMLTYPE res_tmp2 'typ:instance') b
xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
, "typ:instance".
PASSAGE b.res_tmp2
Path of COLUMNS instance_id VARCHAR2 (256) "@id".
path XMLTYPE res_tmp3 'typ:attribute') c
xmltable (XMLNamespaces ("http://schemas.xmlsoap.org/soap/envelope/" AS "SOAP-ENV"
'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS 'type')
, "typ:attribute".
PASSAGE c.res_tmp3
Path of VARCHAR2 (256) COLUMNS attribute_id '@id '.
, data_type VARCHAR2 (256) path '@type '.
, attribute_value VARCHAR2 (256) path '.'
path VARCHAR2 (256) outcome_style '@inferred') d;
Thank you
MhandOK, in this case the best option is to store the answer in a binary table of XMLType (may be a temporary table if you want to) and run the query from there:
CREATE TABLE tmp_xml OF XMLType XMLType STORE AS SECUREFILE BINARY XML -- default storage in your version ;
INSERT INTO tmp_xml VALUES(XMLType(response));
SELECT b.entity_id, c.instance_id, d.attribute_id, d.data_type, d.attribute_value, d.outcome_style FROM tmp_xml t, XMLTABLE( XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV" , 'http://oracle.com/determinations/server/10.3/rulebase/assess/types' AS "typ") , 'SOAP-ENV:Envelope/SOAP-ENV:Body/typ:assess-response/typ:global-instance/typ:entity' PASSING t.object_value COLUMNS ...
-
Problem loading swf which reads data from a local file
Hello
Using flex with an online project, I load a swf file, which reads data in a xml file (it works fine if I open it with flash player)
I do a very simple test:
" < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "
layout = "absolute".
minWidth = "955" = "600" minHeight
>
< mx:SWFLoader id = "swfloader" source="data/player.swf"/ >
< / mx:Application >Result is that player.swf is unable to read the xml file (error: #2044 Error: ioError unsupported: text = Error #2032: error of flow.) URL: enonce.xml).
I do the same test with a project of AIR, and it works very well!
This also works if I put the xml file directly to the same level as my compiled (in bin-debug for example) application.
I think it's a path problem, but I do not know how to configure it.
Is there a way to solve the problem?
Thank you very much!
Olivier
You need to change the code in the SWF file you load. If the SWF file is not
properly designed, it can not be loaded into other SWFs.
-
How to read/write tdms 2.0 files with the TDM C DLL?
Hello
How to read/write tdms 2.0 files with the TDM C DLL?
How consequently the datas in interlaced with the TDM C DLL mode?
Thank you
Confirmation: TDM C DLL always wrote the file in TDMS version 2.0.
-
Hi guys,.The data store server-side will get automatically updated when a new file with the same name is loaded in the landing area?
for example
1 data store created for server-side get the file named UK.xls (he has 5 rows)
2 snapshot created for the above data store
3. created with the snapshot process
After that if I remove 2 lines from the same file and load again to the landing (with the same name). So by re-running the process will take the last file OR do I need to reload the file in the data store every time when there is a change in the file. We also tried with option to work but the last file was not picking up.
Any help will be really appreciated.
Please lets us know your updates.
Please advice
Thank you
VT
Hello
When you create a snapshot, you create a snapshot whose task (provided that you use a data store server-side) can be run from a job. To refresh the data, run the snapshot in a job task. If you create a task at the time the snapshot and the processes that use it, they will automatically connect and will be 'upstream' data through the snapshot in the process. You can then choose whether it would be appropriate to write the snapshot or not (for the effectiveness of performance if you want to do the straight through processing) by activating or deactivating the bucket of data staged that the snapshot written to. The snapshot in the work task means that the data is refreshed.
For the work of design to the Director, you can refresh the snapshot by running again it manually in the context menu.
Kind regards
Mike
-
How to open multiple files with the same extension in one program from the Explorer
I frequently receive several JPG (or whatever extension) files to my clients. On Windows XP, I could just highlight the files I want to open, and then click Open. They would be so open to 1 program cascading. This made it easy when comparing many images. If I do the same thing in Windows 7, it opens the default program several times and puts 1 image of each open program. It is Paint Shop Pro in my case. Thus, instead of so-called images 5 open cascading in Paint Shop Pro... the computer open Paint Shop Pro 5 times with 1 image of each open version of the program. I tried this search like crazy, but cannot find the right thread for an answer. Most of the threads are on the opening of the different file types. My question is only about the opening of multiple files with the same exact file inside 1 free program extension.
Is this the same version of Paint Shop?
One thing you might try is to open Paint Shop, then select and drag all the files in this window of the paint shop. Various programs to manage this type of action differently from the DDE, but it might give you the expected results.
-
Several files with the same name.
Cannot publish to Business Catalyst because of a fatal error, where it is said "why do we have several files with the same name? The website and all its contents have not changed in more than a year with the exception of minor changes to the wording so unable to understand what the error is encountered. Are there not better misdiagnosed at one point less for the files in question.
The problem is the result of a mixture of case-sensitive and case-insensitive between how files within the .oam are put into interaction with and what is written in the muse_manifest.xml file during a re - download full compared to an incremental download.
If all .oam packages files are tiny and the original .oam were replaced in Muse with the all new tiny .oams, then you should select Upload: publish all the files in the dialog box Options. From there, forward publication of incremental changes should work without errors.
-
compare files with the same structure of channel / rename channel(-groups)
Hello
I have several groups ch with many channels in the file of each measure.
Now, I need to display/compare Channels 2 or more files of measures in a chart. (channel 'speed1' to the file 'measurement1' vs 'speed1' to the file 'GCA2' channel)
So I import 2 files in the browser und have the same structure of string twice. To distinguish between the channels of the two files I want to rename the channels by script and add the file name of the channel-group name.
Is this a common way to compare measurement data in files with the same channel names and structures?
In the affirmative. How can I make a script?
Thank you very much in advance!
Ski
Hi Ski-Fahrer,
each channel has a name of the institution.
Data.Root.ChannelGroups ("Name" or Index). Channels (Index or "Name"). Name
You can assign a new name like this:... Name = "NouvNom".
I don't think it is necessary to rename the channels. If you do not forget the files. If you want to rename something I only rename the ChannelGroups by adding a date or a serial number.
Kind regards
Philipp K.
AE | NOR-Germany
-
DISABLE "there is already a file with the same name to this place.
Window 7. 64 bit. How do you turn OFF DISABLE, CANCEL, DELETE, STOP the pop-up 'MOVE the FILE'?
As a user since the days of DOS command lines and having had a routine all the way through to XP, this new window is one of the most annoying pop ups for an experienced user. If it isn't a swith toggle check box or an other power selection for this message, there must be. And if there is, you did it quite hard to find.
The dialog box that appears in Windows 7 that starts with "there is already a file with the same name to this place. It lists then the three choices - "Copy and replace", "Do not copy" and "copy, but keep both files.
I managed several libraries of forms which oblige me to replace the files throughout my day. I make a copy of the file I replace first of all, for archival purposes and this pop-up box is, well, it's boring. There must be a way to disable.
This box comes up to move files and to copy the files.
Any help in these turn off would be appreciated.
See you soon.
-
When I do a file search he finds all files with the same keyword, I'm on windows 7
File search only returns a file name in the search when there are several files whit the same keyword as I entered, this just started to happen. When I typed a keyword in search it returned previously all files with the same keyword, now it returns only one of the files?
Thanks for your suggestion, I'll give it a try and get back to you.
I agree about the garbage, I got several questions on my HP Desktop & Windows 7. My system crashed once, he took over at Best Buy, they told me my operating system has been altered, but could not tell me how to reload my OS unless I paid them $ 125 for the info. In any case, I took my corrupted HP back at home plugged and it started as nothing is never past, sickening!
-
Save the file with the same name
How to change the script to save the file with the same name?
//SaveforWebSP.jsx //Save a fixed width image with a size constraint in its original folder var docRef = activeDocument; var outputFolder = docRef.path; NamesaveRef = new File( outputFolder + "/reference.jpg" ); var NewfileRef = new File( NamesaveRef ) // quality/size constraints var w = 1920; // new file width var MaxSz = 361440; // max. 360Kb var Qlt = 100; // initial quality 100 var x = 1; // decreasing step // resize the image to the right width docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER); // Perform the first SaveForWeb Operation ExpWeb(NewfileRef, Qlt); // Keep trying to save the file with max. Qlt, but under MaxSz while (NewfileRef.length > MaxSz) { Qlt = Qlt - x; NewfileRef = new File( NewfileRef ); NewfileRef.remove(); ExpWeb(NewfileRef, Qlt); // Perform a new SaveForWeb Operation, with slightly lower Qlt if (Qlt <= 40) { alert("The file can't be saved with the desired size AND quality."); break // break the loop whenever the quality is as low as 50 (this shouldn't need to happen) } } var FileSz = NewfileRef.length/1024; FileSz = Math.round(FileSz); // close the original file without saving activeDocument.close(SaveOptions.DONOTSAVECHANGES); // SaveForWeb Export, with the desired constraints and parameters function ExpWeb(FileNm, Qlt) { var options = new ExportOptionsSaveForWeb(); options.quality = Qlt; // Start with highest quality (biggest file). options.format = SaveDocumentType.JPEG; // Save Format for the file docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options); }
Change of line 25 to:
var docName = docRef.name.split('.')[0]; NamesaveRef = new File( outputFolder + "/"+docName +".jpg");
-
Return of the mistake of MUSE: why do we not have several files with the same name?
Well - I thought I had all this worked and fixed, but I met the download error 'Why do we have several files with the same name' once again. (I downloaded all the files several times today in order to 1) works the way it worked the last time and 2) get an OAM file that is not loading for some reason any load again and the download takes about an hour to transfer all the files manually.
To recap:
(1) an option "Upload only modified files" returns the 'Muse has encountered an error and closes. Why do we have several files with the same name? "error just as before.
(2) a full download will work but takes forever and is NOT a substitution for work changed files option.
Please advise with possible solutions!
-Dave
Is it possible to have two .oam different files in different folders on your computer where the .oam files have the same name? I'm theorizing that there may be a bug in the treatment to ensure the folder created for a .oam placed on the server receives a unique name, particularly in the case of a partial update of the site on the server.
Please send us the .muse file and all the files in .oam related to [email protected] along with a link to this topic for the context so we can attempt to reproduce this error and isolate the root cause. If files are larger than 20 MB, you'll need to use a service such as Adobe send & Track, Dropbox, creative cloud, WeTransfer, etc. file sharing. Thank you.
-
Good morning friends,
So for my work, I need a script to open files with the same name but located in a different folder. But since I'm a total noob when it comes to programming, I can't understand how do. That's what I have in mind:
-J' I manually open an image.
-The script will look for a file with the same name in another folder that I've specified.
-The script will then select the channel CMYK of the second file and copy and paste it into the first file.
-The second file is then closed without saving the changes.
I have problems with the part where the script searches for a file with the same name as the opened file. I would really appreciate help. Thanks in advance.
If (app.documents.length > 0) {}
myDocument var = app.activeDocument;
var Nomdoc = myDocument.name;
try {var basename = docName.match (/(.*)-.)} [ ^\.] +$/)[1]}
catch (e) {var basename = thedoc.name};
var path = / * path of folder to insert as a string here * / + ' / ' + base name + / * insert file extension, including the period as a string here * /;
If (queue (path) .exists == true) {var otherDocument = app.open (File (path))};
};
-
I want to export data from a scanned online in the same form in my printer form
I want to export data from a scanned online in the same form in my printer form
Something digital is an image. A picture in itself has no data. It's just the picture of things.
Thus, you can not export or transfer, what is not there.
Be well...
-
Automatically replace the jpg files with the same file name TIFF.
Is there a a way to automatically link the files by replacing the jpg files with the same exact file name TIFF?
Thank you!
Click on the link in the links Panel and open the Panel menu. Choose repeat the link extension.
Maybe you are looking for
-
LaserJet 1000: laserjet 1000 usb or parallel?
I wonder if the port on the Laserjet 1000 series is a USB converted to the parallel port, as the connectors look almost identical.
-
I get an error code 0146 and or the image of exe.bad the logon user interface
I can't reboot my computer, I keep the error code and get or bad image. I have almost everything and I keep getting the black screen reads LogonUIexe.bad image and when I do the test I get an error code 2000 - 0146.help.
-
(Redirected) Is this normal?
So I bought the xbox a package and the same day, the money was withdrawn on 27 April. I check today and my bank account says nothing happened to buy the system and my money is back. In addition, my product says its still in production. Does that mean
-
Switching between Windows 7 and Windows 10 in the future
I plan to make the upgrade to windows 10. However, I still want to use windows 7. is this possible?
-
3.1 the CME with unity UM cycling back to wishes of opening
I have connected 3.1 with unity 4.03 UM CME. Almost everything works. I can call internally and leave messages, MWI works, I can access VM from a phone. What does not work is this situation: 1. call success outside the opening GreetingCH 2. the appel