loop through XML (file) doc
Hi allI'm looking for a code to browse XML file
line by line if I can handle the errors on a line-by-line
I'm looking for code that also runs on oracle 10 g XE!
I'm new to XML...
KR
Martin
Martijnke wrote:
Hi allI'm looking for a code to browse XML file
line by line if I can handle the errors on a line-by-lineI'm looking for code that also runs on oracle 10 g XE!
I'm new to XML...
KR
Martin
Strictly speaking, XML files is not 'lines', they have elements.
Sounds like you want to use the DBMS_XMLDOM package to process the XML nodes.
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14258/d_xmldom.htm#ARPLS399
Tags: Database
Similar Questions
-
Looping through xml in cfscript
OK, I can loop through xml to get the value of the label and output to a variable. But the problem for me becomes the child tags of a specific loop grouped tag. For example, below, I want to bring together the xml like this.
Year: 90
Employer: Bank
Wages: 2000.00
Year: 90
Employer: gas station
Wages: 1000.00
OK, I can loop through xml to get the value of the label and output to a variable. But the problem for me becomes the child tags of a specific loop grouped tag. For example, below, I want to bring together the xml like this.
Year: 91
Employer: Bank
Wages: 2500.00
Year: 91
Employer: gas station
Wages: 1500.00
< year value = "90" >
< name of employer 'Bank' = >
< > 2000.00 salaries < / wages >
< / employer >
< name of employer 'gas station' = >
< > 1000.00 salaries < / wages >
< / employer >
< / year >
< year value = "91" >
< name of employer 'Bank' = >
< > 2500.00 salaries < / wages >
< / employer >
< name of employer 'gas station' = >
< > 1500.00 salaries < / wages >
< / employer >
< / year >
Thanks in advance,
AnthonyThis might be easier with a query. Create one with QueryNew() and fill it when you browse the XML. Then use Q of Q to sort by employer, then the year. You can now use the cfoutput group attribute to group by the employer.
-
Recursive loop through the file system.
Hello!
I'm trying to figure if Javascript is my answer to my problem. I have been able to re - write all my AppleScript scripts that manipulate Illustrator with the exception of those that he had to use the file system. We stayed in PC at work and now I have to figure this out. Our art files are saved with a number of 7 digits, followed by the name of art in the file. Ex: 1000049-Bob Garage. My applescript had a recursive loop that worked its way down through the structure of the files on our server art until it finds the record low where it belonged, then saved in itself. Here is an example of how the structure of server files (these are the folder names) is extended:
1000000-1004999
1005000-1005999
1010000-1014999
and so on.
The script would load all foldernames in the first level of the directory, loop through them and watch the first and last name of each of these folder names, then compare the Illustrator file name to them. If my file is between the two, then the loop itself, called loaded the files inside of that folder and in doing so, working its way down through the folders through the tree structure until there where records is no longer. At this point, the file was saved, in the order, where it should be.
I have no idea on how to start this task with Javascript, if this is possible even with a language developed for browsers. I'm with other people who are frustrated by such a widely adopted language, if little info is available on its use outside the browser. If anyone can tell me all resources dealing with Javascript programming of the file system, or even to have the kindness to write this little monster for me, I'd always in your debt!
Thanks in advance for any time you spend with this problem!
Open the ESTK, and then on the Help menu, you will find a link to the Javascript Tools Guide. You will find everything that you need in Chapter 3 file system access.
-
say, I declare a number table num_arr, I want the num_arr to be filled with id: 1 and 2.I have the below XML and i want to loop through this XML and put the value in an array <Subproductdetails> <Subproduct id="1" name="AA" /> <Subproduct id="2" name="BB" /> </Subproductdetails>
is someone can please show me how this is done in pl/sql
Thank you.Hello
If you have 10.2 or higher, try this:
DECLARE TYPE num_arr_type IS TABLE OF NUMBER; num_arr num_arr_type; v_xml xmltype := xmltype('
For versions prior to 10.2 (and with the support of xmltype), use the following SELECT statement instead:
SELECT extractvalue(column_value, 'Subproduct/@id') BULK COLLECT INTO num_arr FROM Table( XMLSequence( Extract(v_xml, '/Subproductdetails/Subproduct') ) );
-
How do multiple loops through XML in PL/SQL
My XML looks like this:
<data>
<row>
<id>1</id>
<name>John</name>
<name>Jack</name>
</row>
<row>
<id>2</id>
<name>Scott</name>
<name>Chuck</name>
<name>Kim</name>
</row>
</data>
I would like to output:
->1
-->John
-->Jack
->2
-->Scott
-->Chuck
-->Kim
My current code looks like this:
< code >
DECLARE
XMLType X: = XMLTYPE ("<?") XML version = "1.0"? >
< data >
< row >
< id > 1 < /ID >
< name > John < / name >
< name > Jack < / name >
< / row >
< row >
< code > < /ID > 2
< name > Scott < / name >
< name > Chuck < / name >
< name > Kim < / name >
< / row >
(< / data > ');
BEGIN
FOR R IN (SELECT EXTRACTVALUE (VALUE (P), ' /row/id/text ()') ID
OF TABLE (XMLSEQUENCE (EXCERPT of (X, ' / / data/row '))) P)
LOOP
DBMS_OUTPUT. Put_line ('-->' |) R.ID);
END LOOP;
END;
< code >
I would need a loop more inside a line to make a loop on the name tag, but I don't know how to do it.
A little help would be appreciated.
I thought about it myself. Here is the code:
DECLARE
XMLTYPE X: = XMLTYPE (')
1 John Jack
');2 Scott Chuck Kim BEGIN
FOR R IN (SELECT EXTRACTVALUE (VALUE (P), '/row' / id/text ()) AS ID,
Extract (value (P), "/ line / promises") AS PROMET
OF TABLE (XMLSEQUENCE (EXCERPT of (X, ' / / data/row '))) P)
LOOP
DBMS_OUTPUT. PUT_LINE ('-->' |) R.ID);
FOR R1 IN (SELECT EXTRACTVALUE (VALUE (T1), '/ name/text ()') AS NAME
OF TABLE (XMLSEQUENCE (EXTRACT (R.PROMET, ' promises / name '))) T1)
LOOP
DBMS_OUTPUT. PUT_LINE ('-->' |) R1.NAME);
END LOOP;
END LOOP;
END;
-
This is the situation. I'm parsing xml and implementation in a cfquery.
This is the basic structure of the xml
< year account = 1 value = 90 >
< tag1 > 300 < / tag1 >
< > 400 tag2 < / tag2 >
< / year >
< value year = 91 >
< tag1 > 100 < / tag1 >
< > 200 tag2 < / tag2 >
< / year >
< value year = 92 >
< tag1 > 500 < / tag1 >
< / year >
Tag1 will exist always and only sometimes Tag2
I'm a loop in the XML and put in a request that looks a lot like this.
Year Tag1 Tag2
How do I detect if tag2 exists under each year tag can insert the value in the query or put zero in the request when there is no?
Thanks in advance.
Have you tried StructKeyExists(). It seems to work with 7.0.2
...
There are
Not exist
-
How to set the text frames loops through the active doc
Hi experts
I have this script:
myDoc var = app.activeDocument;
myTextFrame = myDoc.textFrames;
for (var F = myTextFrame.length;) F > 0; F --){
While (myTextFrame [F] .overflows)
myTextFrame [F].parentStory.pointSize-= 0.5;
}
but I still got the error after you run the script, can someone tell me what is the problem with set it?
respect of
John
not sure, but it works
myDoc = app.documents var [0];
myPages var = myDoc.pages;
for (var i = 0; i)< mypages.length;="" i++)="">
myPage var = myDoc.pages.item (i);
myFrame var = myPage.textFrames;
for (var m = 0; m< myframe.length;="" m++)="">
If (.overflows myFrame.item (m)) {}
myFrame.item (m).parentStory.pointSize-= 0.5;
}
};
};
-
transform file to plain text to multiple XML files
This is my requirement
1. choose a text to a ftp location.
2. the format of the example in the text file is
John | DOE | 30
Ryan | Adams | 50
Brian | White | 30
In the example, the file has 3 disks. I need to transform each record in 1 xml file. So the example will create 3 xml file.
Step 1.
I'll create a proxy service to choose the text file of the ftp folder.
Step 2.
How do I loop through the file and for each record call another service proxy or business with one record at a time. ???
Step 3.
I create a map to transform the record in an xml text and save it in a text via the company file.
Help appreciated.
Kind regards.
Published by: 811245 on November 14, 2010 23:10Please see-
Oracle Service Bus (OSB) - read the contents of a file line by line
Kind regards
Anuj -
My input XML file is...
I get this XML using file adapter...
<? XML version = "1.0" encoding = "UTF-8"? >
-< root xmlns:ns2 = "http://www.w3.org/2001/XMLSchema" >
-< ns2:ReceiptBatch >
< ns2:FileID > "99999" < / ns2:FileID >
< ns2:Warehouse > in THE < / ns2:Warehouse >
'L' < ns2:Revision > < / ns2:Revision >
< ns2:DocID > A4 < / ns2:DocID >
-< ns2:Receipt >
< ns2:DeliveryNo > 123 - OP < / ns2:DeliveryNo >
< ns2:ProcessDate > 112138 < / ns2:ProcessDate >
< ns2:ContainerNo > 98765 < / ns2:ContainerNo >
< ns2:Instructions > TREKAU < / ns2:Instructions >
< ns2:ReceiptType > 1 < / ns2:ReceiptType >
< ns2:SuppCustCode > 111 < / ns2:SuppCustCode >
TREK-Cycle < ns2:SuppCustName > < / ns2:SuppCustName >
-< ns2:ReceiptDetails >
< ns2:Line > 1 < / ns2:Line >
< ns2:ProductCode > 1000 < / ns2:ProductCode >
< ns2:QuantityAdvised > 1 < / ns2:QuantityAdvised >
< ns2:QuantityReceived > 1 < / ns2:QuantityReceived >
< / ns2:ReceiptDetails >
-< ns2:ReceiptDetails >
< ns2:Line > 2 < / ns2:Line >
< ns2:ProductCode > 2000 < / ns2:ProductCode >
< ns2:QuantityAdvised > 2 < / ns2:QuantityAdvised >
< ns2:QuantityReceived > 2 < / ns2:QuantityReceived >
< / ns2:ReceiptDetails >
-< ns2:ReceiptDetails >
< ns2:Line > 3 < / ns2:Line >
< ns2:ProductCode > 2000 < / ns2:ProductCode >
< ns2:QuantityAdvised > 3 < / ns2:QuantityAdvised >
< ns2:QuantityReceived > 3 < / ns2:QuantityReceived >
< / ns2:ReceiptDetails >
< / ns2:Receipt >
< / ns2:ReceiptBatch >
< / root >
There are 2 tables in the database.
Table 1 = T1743512
Table 2 = T2743002
table - structure
T1743512-
DOCO KCOO DTCO LNID LNIX LITM NOTICE USR JOBN UPMJ PID'M CKNU UREC
123 00026 1 1 1000 1 1 123 - OP OP
124 00026 1 1 1000 1 1 124 - OP OP
123 00026 2 2 1000 2 2 123 - OP OP
123 00026 3 3 1000 3 2 123 - OP OP
Things to do are:--
1. Research Notice T1743512 (table) with the following keys:
1.T1743512. CKNU = < DeliveryNo > XML
2.T1743512. LNIX = XML < row >
II. write a record in the T2743002 table for each < RecieptDetails >. (See map below)
Mapping of the records in the table T2743002 to < ReceiptDetails >
EDU - "SABSSV".
EDBT - < EDBT > (the same for all records)
EDTN - < DeliveryNo > (from the section < reception > XML)
EDLN - < row > (from < ReceiptDetails > section in XML format)
EDSP - white
DOCO - white
DCTO - white
KCOO - white
LNID - white
LITM - < ProductCode > < ReceiptDetails > section
UORG - < QuantityAdvised > < ReceiptDetails > section
UREC - < QuantityReceived > < ReceiptDetails > section
USER - "SABSSV".
JOBN - "SOA - 3PL".
PID - 'PO-ENTRANTS ".
UPMJ - current Date Julian
- Hour current HHMMSS
Please suggest the solution.
Published by: Prashant_AP on June 22, 2012 12:24 AMHello
Solution by using a loop in BPEL;
1 count the number of nodes for ReceiptDetails.
2 create a counter for loop through each node ReceiptDetails. Use a while loop in BPEL
3 search T1743512 (table) with DeliveryNo and the line. Make sure that you select the correct line from the ReceiptDetails node element node. This can be done using the counter example of xpatch ns2:ReceiptBatch / ns2:Receipt / ns2:ReceiptDetails [counter] / ns2:Line. Please use the DB adapter.
I guess that the DeliveryNo can only appear once in the document following your example.
4. for each receiptDetails you write a record in table too T2743002. Please use the DB adapter.
5. Since the time increment the counter. This is to ensure that the while loop stops at the point where the counter is greater then the number of nodes to ReceiptDetails.I think a better solution is to make the loop in PL/SQL. It will be faster. You specify an input of type of collection in your pl/sql package parameter. Assign all items receiptDetails and DeliverNo line to the PL/SQL package. Within PL/SQL unravel you the closure. With a little luck, you have the T2743002 in the same schema to create the record too. Otherwise create synonyms of the database or database links.
Good luck
Thank you
Sander
-
Error loading XML file in the column of XMLTYPE through SQL loader
Hi gurus,
I am trying to load the XML file into the column of XMLTYPE through SQL Loader but the errors themselves. Here are the details
Databases
The table structureSQL*Plus: Release 10.2.0.3.0 - Production on Tue Jul 24 17:17:55 2012 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Release 10.2.0.3.0 - 64bit Production BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.3.0 - 64bit Production PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for Linux: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production
XML (simple.xml) fileCREATE TABLE TH_XML ( COL_ID_1 VARCHAR2(100 BYTE), IN_FILE_1 XMLTYPE ) XMLTYPE IN_FILE_1 STORE AS CLOB (TABLESPACE SMDAT)
Control file<?xml version="1.0"?> <catalog> <book id="bk101"> <author>Some Author1</author> <title>Some Title1</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>creating applications</description> </book> <book id="bk112"> <author>Some Author2</author> <title>Some Title2</title> <genre>Computer</genre> <price>49.95</price> <publish_date>2001-04-16</publish_date> <description>Microsoft Visual Studio 7 is explored in depth</description> </book> </catalog>
LOG fileLOAD DATA INFILE 'c:\simple.xml' APPEND INTO TABLE TH_XML XMLTYPE(in_file_1) ( col_id_1 filler CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF )
I get error ORA-00904: "SYS_NC_ROWINFO$": invalid identifier in the logfile (mentioned above). Could someone help me know where I am doing wrong?SQL*Loader: Release 10.2.0.3.0 - Production on Tue Jul 24 16:42:25 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Control File: c:\my_file.ctl Data File: c:\simple.xml Bad File: c:\simple.bad Discard File: none specified (Allow all discards) Number to load: ALL Number to skip: 0 Errors allowed: 50 Bind array: 64 rows, maximum of 256000 bytes Continuation: none specified Path used: Conventional Table TH_XML, loaded from every logical record. Insert option in effect for this table: APPEND Column Name Position Len Term Encl Datatype ------------------------------ ---------- ----- ---- ---- --------------------- COL_ID_1 FIRST 100 CHARACTER (FILLER FIELD) IN_FILE_1 DERIVED * EOF CHARACTER Static LOBFILE. Filename is c:\simple.xml Record 1: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 2: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 3: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 4: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 5: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 6: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 7: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 8: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 9: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 10: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 11: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 12: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 13: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 14: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 15: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 16: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 17: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 18: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 19: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 20: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 21: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 22: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Record 23: Rejected - Error on table TH_XML. ORA-00904: "SYS_NC_ROWINFO$": invalid identifier Table TH_XML: 0 Rows successfully loaded. 23 Rows not loaded due to data errors. 0 Rows not loaded because all WHEN clauses were failed. 0 Rows not loaded because all fields were null. Space allocated for bind array: 256 bytes(64 rows) Read buffer bytes: 1048576 Total logical records skipped: 0 Total logical records read: 23 Total logical records rejected: 23 Total logical records discarded: 0 Run began on Tue Jul 24 16:42:25 2012 Run ended on Tue Jul 24 16:42:26 2012 Elapsed time was: 00:00:00.23 CPU time was: 00:00:00.05
Thanks in advance.
Published by: 876991 on 24 July 2012 14:18Hello
This remove the control file:
XMLTYPE(in_file_1)
It is used only if the target table is an array of XMLType object.
For an XMLType column LOBFILE is sufficient, for example:
LOAD DATA INFILE * APPEND INTO TABLE TH_XML ( col_id_1 CHAR (100), in_file_1 LOBFILE(CONSTANT "c:\simple.xml") TERMINATED BY EOF ) begindata MYID1
It tells SQL * Loader data consisting of one record with COL_ID_1 = "MYID1" and content = "c:\simple.xml" IN_FILE_1
SQL> CREATE TABLE TH_XML 2 ( 3 COL_ID_1 VARCHAR2(100 BYTE), 4 IN_FILE_1 XMLTYPE 5 ); Table created. SQL> host sqlldr control=test.ctl Username:dev Password: SQL*Loader: Release 11.2.0.2.0 - Production on Mer. Juil. 25 01:30:46 2012 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. Commit point reached - logical record count 1 SQL> set long 5000 SQL> column col_id_1 format a15 SQL> select * from th_xml; COL_ID_1 IN_FILE_1 --------------- -------------------------------------------------------------------------------- MYID1
Some Author1 Some Title1 Computer 44.95 2000-10-01 creating applications Some Author2 Some Title2 Computer 49.95 2001-04-16 Microsoft Visual Studio 7 is explored in depth -
How to loop through the CSV file
Hello
I want to loop through each column in a CSV file.
And while the closure of each column, I want to loop every line starting with line 2 St.
I wrote the code below, but it's a loop in the lines from rank 1.
How can I start the loop from the 2nd row in the CSV file?
(see code below)
Can someone tell me how to proceed?
THX
<!-Download and read the file CSV - TXT->
< cffile action = "read" variable = "C:\Documents and Settings\user\Desktop\EM-CSV\test.csv" file = "csvfile" >
<!-browse the CSV - TXT file on line breaks and insert into the database->
< table border = "1" >
< cfloop index = list 'index' = "' #csvfile # ' delimiters =" #chr (10) ##chr (13) #">"
<!-< cfoutput > #listgetAt('#index#',1, ',') # < / cfoutput > < br >->
< b >
< td > < cfoutput #index # > < / cfoutput > < table >
< td > < cfoutput > #listgetAt('#index#',2, ',') # < / cfoutput > < table >
< td > < cfoutput > #listgetAt('#index#',3, ',') # < / cfoutput > < table >
< /tr >
< / cfloop >
< /table >
Hi Like2Flex,
The problem is that coldfusion does not see
list = "a, b, c, d.
as a list of 9 things you expect. He just sees 4 elements a, b, c and d because Coldfusion does not include two delimiters next to each other.
A solution to the problem is to manually insert a space between two delimiters that are side by side. Here is an example of such a solution
length of the list:#listlen (list) # -
Through the XML file in a table?
Hi all
I am having trouble interrperting how I should browse a XML file and pushing it toward a table to display data sets.
Here is my as:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = {function (ok)}If {(ok)
ALLDATA = this.firstChild.childNodes;
allEntries = this.firstChild.firstChild.childNodes;for (i = 0; i < alldata.length; i ++) {}
trace (newline + "letter:" + alldata [i] .nodeName);for (r = 0; r < allEntries.length; r ++) {}
trace(allEntries[r].nodeName+":"+allEntries[r].firstChild);
}}
} else {}
trace ("loading error");
}
};
myXML.load ("temp_glossary.xml");This is my XML:
<? XML version = "1.0" encoding = "iso-8859-1? > <!-this - >
< Glossary >< A >
< aardvark > he is an Aardvark < / Aardvark > <! - firstChild.firstChild.firstChild - >
< Apple > it is an Apple < / Apple >
< EPA > it's a monkey < / EPA >
< /A >< B >
< Ball > it is a ball < / balls >
< bat > it is a bat < / Bat >
< bike > it is a bike < / Bike >
< /B >< C >
< drive > it is a car < / car >
< heading > it is a cap < / Cape >
< Cook > This is a Cook < / Cook >
/ < C >
< / Glossary >Output is currently:
Letter: A
Aardvark: he is an Aardvark
Apple: this is an Apple
EPA: it is a monkeyLetter: B
Aardvark: he is an Aardvark
Apple: this is an Apple
EPA: it is a monkeyLetter: C
Aardvark: he is an Aardvark
Apple: this is an Apple
EPA: it is a monkeyThe output, I see I only have access to the firstChild whenever I write the words, but I do not know how to go about it increments to the next block of words. I guess I can do with a 2D array and iteration, but don't know how to implement.
Any help would be greatly appreciated, thank you.
Chris
:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = {function (ok)}
If {(ok)
ALLDATA = this.firstChild.childNodes;
allEntries = this.firstChild.firstChild.childNodes;
for (i = 0; i
trace (newline + "letter:" + alldata [i] .nodeName);
for (r = 0; r
trace (Alldata [i] Sublst.ChildNodes(1).ChildNodes(0) [r].firstChild.nodeValue);
}
}
} else {}
trace ("loading error");
}
}; -
How to create a search field to search for keywords in the XML through AS3 file?
Hello world.
I am trying to create a field of research in AS3 to search for keywords in a dynamic text field of the same flash movie, where the text is loaded from an XML file.
Kind regards
Kartik.P
Look in the String class and its methods, specifically the indexOf() (to find) and substr() (of extraction) methods.
-
Hello. I'm trying to parse an XML file through Dom this process of execution with Ruffles of colors in another excerpt, so I just take the code as what and put it in my Blackberry project
I'm looking for the children of the element 'data' (there is tow in the file, the 'key' and the 'data') but in blackberry, I had 0. !!!
Attached is a screen of debug.
Is there a condition to check frst or something like that?
Oh, man, can't believe it...!
My root element is 'data', while I was doing this:
Root element = doc.getDocumentElement ();
Elements of NodeList is root.getElementsByTagName ('data');.
Node = items.item dataNode (0);
NodeList children = dataNode.getChildNodes ();And my code of bombs in the dataNode...!
If I changed to:
Elements of NodeList = doc. getElementsByTagName ('data');
Node = items.item dataNode (0);
NodeList children = dataNode.getChildNodes ();now works fine... : !!!
Another X file... !!!
-
Hi all
Orientation help need to load the XML file into Oralce 11 g R2 db (NOT XMLDB).
I went through some threads in the forums itself, but nothing is close to my requirement.
MY requirement is
I have a shared folder where to get several xml files (based on the volume of data, the number of the file will be very, mean the file number is not static)
all of this data file must be loaded into an oracle table.
It looks like something as below should be done (but don't know how to implement this)
identify each file in the folder (the unix loop),
using oracle, load data from this xml file into the oracle table
Continue the process until we reach the last file in the folder.
could you please shed some light on this...
Thanks in advance.
Here is an example of the incision I think you are trying to do... Notice that the upper level is driving the other levels (rankings, media).
Select hereby, wagneur, s.*
of temp_xml t
, XMLTable (XMLNamespaces (default 'http://www.abcs.com/fdp'), ' / Instrument_Roots/Instrument_Root ")
in passing t.object_value
columns
Path of varchar2 (100) Instrument_ID 'Instrument_ID '.
, Path of varchar2 (100) Deal_number 'Deal_number '.
, Path of varchar2 (100) Class_Code "Class_Code.
, Path of varchar2 (100) Class_Text "Class_Text.
, Path of xmltype rankings 'Instrument_Rankings '.
, Path of xmltype supports 'Instrument_Supports '.
) l
, XMLTable (XMLNamespaces (default 'http://www.abcs.com/fdp'),
' / Instrument_Rankings/Instrument_Ranking.
in passing l.Rankings
columns
Path of varchar2 (100) Ranking_Class_Number 'Ranking_Class_Number '.
, Path of varchar2 (100) Instrument_ID 'Instrument_ID '.
, Path of xmltype attributes 'Instrument_Ranking_Attributes '.
) d
, XMLTable (XMLNamespaces (default 'http://www.abcs.com/fdp'),
' / Instrument_Supports/Instrument_Support.
in passing l.Supports
columns
Path of varchar2 (100) Instrument_ID 'Instrument_ID '.
, Path of varchar2 (100) Support_ID 'Support_ID '.
, Path of varchar2 (100) Organization_ID 'Organization_ID '.
, Path of varchar2 (100) Organization_Role_Code 'Organization_Role_Code '.
, Path of varchar2 (100) Ranking_Class_Number 'Ranking_Class_Number '.
) s
Maybe you are looking for
-
Satellite U840W PSU5XA - Win 8.1 installation and effective use of SSD
Hello. IM in the hope of a solution to the two questions.The second that I suspect is caused by the first. Satellite U840W PSU5XA-001006 Has started getting the BSOD with various defects.The most persistent has been IRQ LESS or not EQUAL - iaStorAV.s
-
Blocked contacts can see that they are blocked
It happens with everyone? If I block someone from my contact list, they can see that showing me in their list of contacts as that user with a question mark instead of a regular icon. Is it possible to fix it?
-
In Keithley 2410, string number read voltage conversion
Hello I want to drive the current and voltage with Keithley 2410 to read. However, I can read the correct voltage value in the screen of the device, I can't read the correct voltage value in the display of laboratory program. The problem occurs while
-
Attempt to delete an e-mail message, and when I do, Windows closes.
original title: mail and windows problem I myself sent an e-mail link. Now when I try to delete it, Windows stops. The link is "writing travel details" How can I get rid of this email? Thank you.
-
Google services drain my battery.
Google services and Google Photos have been draining my battery and causing it to heat again. This has been a persistent problem that happens from time to time. I'm looking for solutions and advice here, so it would be great if someone help me with t