Update of the part of XML code stored as a CLOB
HelloI have an xml object that is stored in a CLOB filed to a table. I want to update a part of this xml file. I thought 'udpateXML' is the best to use for this purpose. But, when I use "updateXML", the XML formatting is not retained. I receive the complete xml code in a single line. This is not acceptable.
Please let me know if there are other ways to achieve this.
Here is an example of what I'm trying to do and the result:
with t as
(select "< main >)
< sub-tag >
Text < child > < / child >
< / subtag >
(< / hand > ' double sample_xml)
Select sample_xml,
(updatexml (xmltype (sample_xml),'/ / child/text main/subtag () ',' updated_xml text')) .getClobVal (new)
t;
Here is the output.
SAMPLE_XML UPDATED_XML
------
new < principal > < principal > text < sub > < child > < / child > < / sub > < / hand >
< sub-tag >
Text < child > < / child >
< / subtag >
< / hand >
I use Oralce11g database and SQLNavigator Editor.
Thank you
Anuradha
First of all, why the new format is unacceptable? Show me an Analyzer who cares and I'll show you an updated parser incorrectly implemented.
For formatting XML for human readability purposes, then XMLSerialize... as dash CLOB size... as shown in {message identifier: = 3788239}
Tags: Database
Similar Questions
-
Error during the handling of XML column stored as a CLOB
In the Version of SQL Developer 4.0.0.13, build HAND - 13.80, I am unable to view the result of a manipulation of a column of a table that is stored as a CLOB xmltype. The SQL below illustrates this:
CREATE TABLE xml_lob_locator ( xml_data XMLTYPE ) XMLTYPE xml_data STORE AS CLOB / INSERT INTO xml_lob_locator (xml_data) VALUE (XMLTYPE('<ROOT/>')) / SELECT EXTRACT( xml_data , '/*' ) FROM xml_lob_locator /
When you view the value returned by the following SELECT statement, this error is returned in the dialog box "display value":
ORA-22275: specified incorrect LOB Locator
This seems to happen for any operation of XML that returns an XMLTYPE: EXTRACT, UPDATEXML, INSERTCHILDXML, etc.
It is a database bug which I believe has been fixed in 11.2.0.4 and 12cR1
You can use to work around the problem, run as a script:
SELECT
EXTRACT)
donnees_xml
, '/*'
)
of xml_lob_locator
/
What gives the SQL Developer
EXTRACT(XML_DATA,'/*') ------------------------------------
-
Download windows updates but the failure error 80080005 code
Ive tried to download the updates of windows, but has no 80080005 error code
Hello
allows you to see if the information below
-
Windows cannot search for updates (all the time of different codes)
I have a system that is used to run windows 7 well. Then I went to windows 10 and had problems after a major update soon after liberation. After that, my system did so, but I ran into issues. As a result, nearly a year later, I decided to try to go back to windows 7 with a completely new reinstall and re-upgrade. My windows 7 will not update and I miss all the tools that I can find as a substitute or a repair or cmd commands. The initial error is coded C80003FA. I did a lot of difficulties which seems to be similar to my questions and the Fix - it tool cannot find convenience stores. I also tried the standalone installer of windows and he found the fix, but could not install. After doing all the patches that seem relatable to me somehow, I now get the error code 8008005. This code came while typing, but other codes appeared as well.
Y at - it suggestions on what I can do or is there a way to help?
Thank you
SYSTEM:
Processor: AMD FX 8350 3.2 GHz
GPU: MSI R9 380 4 games
RAM: AMD 8 GB DDR3 RAM
Hard drive: Seagate 1 TB drive HARD drive
PSU: Corsair CX750
MSI M5A97 EVO Motherboard R2.0
Hi Harry,.
At this point we suggest is that reset you the Windows Update components. To do this, you can consult this article for steps to reset the Windows Update components
Let us know how it goes.
-
MERGER update: is the part WHERE the necessary in part updated?
Look at the example of MERGE statement below, there the line with "WHERE Dt.Column1 = Phpparameters.Parameter1":
The conduct is necessary or not?MERGE INTO Destiantiontable Dt USING (SELECT Parameter1, Parameter2 FROM Dual) Phpparameters ON (Dt.Column1 = Phpparameters.Parameter1) WHEN MATCHED THEN UPDATE SET Dt.Column2 = p.Parameter2 WHERE Dt.Column1 = Phpparameters.Parameter1 WHEN NOT MATCHED THEN INSERT (Dt.Column1, Dt.Column2) VALUES (Dt_Seq.Nextval, Phpparameters.Parameter2);
I understand that the line is not necessary, but it may be, can you explain?
Oracle 10g, Linux.
The statement is built in Php code, and the input parameters are: "parameter1, parameter 2. The application must insert or update the Destiantiontable table.Maybe this line makes it more quick update?
Could even make it slower:
SQL> create table t (a primary key, b) as select 1 a, 2 b from dual / Table created. SQL> exec dbms_stats.gather_table_stats(user, 't', cascade => true) PL/SQL procedure successfully completed. SQL> explain plan for merge into t using (select 1 a, 3 b from dual) p on (t.a = p.a) when matched then update set b = p.b where t.a = p.a / Explain complete. SQL> select * from table(dbms_xplan.display) / PLAN_TABLE_OUTPUT --------------------------------------------------------------------------------------------------------- Plan hash value: 3605539002 ----------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ----------------------------------------------------------------------------------------------- | 0 | MERGE STATEMENT | | 1 | 25 | 3 (0)| 00:00:01 | | 1 | MERGE | T | | | | | | 2 | VIEW | | | | | | | 3 | NESTED LOOPS | | 1 | 6 | 3 (0)| 00:00:01 | | 4 | TABLE ACCESS BY INDEX ROWID| T | 1 | 6 | 1 (0)| 00:00:01 | |* 5 | INDEX UNIQUE SCAN | SYS_C0084045 | 1 | | 0 (0)| 00:00:01 | | 6 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 | ----------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 5 - access("T"."A"=1) 18 rows selected. SQL> explain plan for merge into t using (select 1 a, 3 b from dual) p on (t.a = p.a) when matched then update set b = p.b / Explain complete. SQL> select * from table(dbms_xplan.display) / PLAN_TABLE_OUTPUT ------------------------------------------------------------------------------------------------------- Plan hash value: 3605539002 ----------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ----------------------------------------------------------------------------------------------- | 0 | MERGE STATEMENT | | 1 | 6 | 3 (0)| 00:00:01 | | 1 | MERGE | T | | | | | | 2 | VIEW | | | | | | | 3 | NESTED LOOPS | | 1 | 6 | 3 (0)| 00:00:01 | | 4 | TABLE ACCESS BY INDEX ROWID| T | 1 | 6 | 1 (0)| 00:00:01 | |* 5 | INDEX UNIQUE SCAN | SYS_C0084045 | 1 | | 0 (0)| 00:00:01 | | 6 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 | ----------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 5 - access("T"."A"=1) 18 rows selected.
Note that the calculation BYTES rises when the where clause is included.
Functionally the two statement are equal if. -
How to insert data into the table of plain text stored as a CLOB in another table
Hi people,
Maybe it's an easy question for someone who is more frequently used files and CLOB.
I have a table that stores text files in the CLOB column. Files text includes some basic data that I want to load in the other - a text line = a new insert for me. Is there a "trick" how to do it effectively?
Here is my model:
Table OS_IMPORT_DOCS, stores the complete files as CLOB
Sample data from OS_IMPORT_DOCSSQL> desc OS_IMPORT_DOCS Name Type Nullable Default Comments ------------- -------------- -------- ------- -------- OBJECT_ID NUMBER DATUM_ZMENY DATE sysdate FILE_PATH VARCHAR2(4000) Y FILE_NAME VARCHAR2(4000) Y FILE_SIZE NUMBER Y LAST_MODIFIED DATE Y DOCUMENT CLOB Y STATUS VARCHAR2(15) Y 'NEW'
Example of file CLOB - stored text data (select d.document from os_import_docs d where d.object_id = 1815042 ;)SQL> select * 2 from os_import_docs d 3 order by d.last_modified desc 4 ; OBJECT_ID DATUM_ZMENY FILE_PATH FILE_NAME FILE_SIZE LAST_MODIFIED DOCUMENT STATUS ---------- ----------- ------------------------------ --------------- ---------- ------------- ----------- --------------- 1815043 13.8.2012 1 d:\data\C120813.DAT C120813.DAT 16800 13.8.2012 16: <<CLOB>> NEW 1815042 13.8.2012 1 d:\data\C120812.DAT C120812.DAT 3600 12.8.2012 22: <<CLOB>> NEW 1815041 13.8.2012 1 d:\data\C120811.DAT C120811.DAT 1800 11.8.2012 13: <<CLOB>> NEW
Above the example text includes "columns" in plain text:061053120820120000AGT000002Osoby 0000000042301000000017210632 062322120820120000AGT000002Osoby 0000000012301000000017197566 063526120820120001AGT000002Osoby 0000000012301000000017197566 064234120820120001AGT000002Osoby 0000000103301000000162218777
timestamp - 1-14, SSMIHH24DDMMYYYY position format
flag - post 15-18
company code - position 19-27
etc...
How can I query data stored within the OS_IMPORT_DOCS. The DOCUMENT column, divide it into columns and insert into another table?
I have to read this method of 'online' file?
Thank you very much
TomasFor the first three columns:
SQL> create type TRecord is object ( 2 ts timestamp 3 , flag varchar2(4) 4 , company_code varchar2(9) 5 ); 6 / Type created SQL> SQL> create type TRecordTable is table of TRecord; 2 / Type created SQL> SQL> create or replace function parse_clob (p_doc in clob) 2 return TRecordTable pipelined 3 is 4 lf number; 5 eol varchar2(2) := chr(10); 6 eollen number := length(eol); 7 line varchar2(32767); 8 offs number := 1; 9 begin 10 loop 11 lf := dbms_lob.instr(p_doc, eol, offs); 12 if lf != 0 then 13 line := dbms_lob.substr(p_doc, lf - offs + 1 - eollen, offs); 14 offs := lf + eollen; 15 else 16 line := dbms_lob.substr(p_doc, dbms_lob.getlength(p_doc) - offs + 1, offs); 17 end if; 18 pipe row ( 19 TRecord( 20 to_timestamp(substr(line, 1, 14), 'HH24MISSDDMMYYYY') 21 , substr(line, 15, 4) 22 , substr(line, 19, 9) 23 ) 24 ); 25 exit when lf = 0; 26 end loop; 27 end; 28 / Function created SQL> SQL> select t.* 2 from os_import_docs d 3 , table(parse_clob(d.document)) t 4 where d.object_id = 1815042; TS FLAG COMPANY_CODE -------------------------------------- ---- ------------ 12/08/12 06:10:53,000000 0000 AGT000002 12/08/12 06:23:22,000000 0000 AGT000002 12/08/12 06:35:26,000000 0001 AGT000002 12/08/12 06:42:34,000000 0001 AGT000002
-
How to read XML data stored as a Clob
Hello
I'm new on clob & XML types...
Data XML has been inserted into a Clob field in a Table in Oracle (9.2.0.8.0)
-----------------------------------------------------------
CREATE THE TEMP TABLE
(
SNO NUMBER (5),
STR_VAL LONG,
CREATED_DT DATE default sysdate,
COL2 CLOB,
COL3 SYS. XMLTYPE
)
-----------------------------------------------------------
SELECT dbms_lob.getlength (col2) of temp
---
-> 24754
-----------------------------------------------------------
SQL > select temp col2;
COL2
----------------------------------------------
& lt; DataSet1 & gt;
& lt; TAGSDATATABLE & gt;
& lt; TAG_NAME & gt; KST20001 & lt; / TAG_NA
--------------------------------------------------------------------------
If I use the stmt above it shows only a pice of data
How can I get the data in this column.
could someone help to obtain the data.
Concerning
Prakash
Published by: user12957183 on August 25, 2010 12:25 AMInsert data in to table XMLTYPE clob variable:
SQL> ed Wrote file afiedt.buf 1 declare 2 my_clob CLOB := '
'; 31 BEGIN 33 INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob)); 34* end; SQL> / PL/SQL procedure successfully completed. SQL> desc my_tab1; Name --------------------------------------------------------------------------------------------------- TABLE of XMLTYPE SQL> -- For larger data: SQL> ed Wrote file afiedt.buf 1 declare 2 my_clob CLOB := 'KST20001 3 4KST20002 5KST20003 6 8KST20004 79 11KST20005 1012 14KST20006 1315 17KST20007 1618 20KST20008 1921 23KST20009 2224 26KST20010 2527 29KST20009 283 '; 148 l_xmltype xmltype; 149 BEGIN 150 --l_xmltype := my_clob; 151 INSERT INTO my_tab1 VALUES(XMLTYPE(my_clob)); 152* end; SQL> / PL/SQL procedure successfully completed. SQL>4 6KST20001 57 9KST20002 810 12KST20003 1113 15KST20004 1416 18KST20005 1719 21KST20006 2022 24KST20007 2325 27KST20008 2628 30KST20009 2931 33KST20010 3234 36KST20009 3537 39KST20009 3840 42KST20009 4143 45KST20009 4446 48KST20010 4749 51KST20009 5052 54KST20009 5355 57KST20009 5658 60KST20009 5961 63KST20010 6264 66KST20009 6567 69KST20009 6870 72KST20009 7173 75KST20009 7476 78KST20010 7779 81KST20009 8082 84KST20009 8385 87KST20009 8688 90KST20009 8991 93KST20010 9294 96KST20009 9597 99KST20009 98100 102KST20009 101103 105KST20009 104106 108KST20010 107109 111KST20009 110112 114KST20009 113115 117KST20009 116118 120KST20009 119121 123KST20010 122124 126KST20009 125127 129KST20009 128130 132KST20009 131133 135KST20009 134136 138KST20010 137139 141KST20009 140142 144KST20009 143145 147KST20009 146Published by: AP on August 25, 2010 04:46
-
How to optimize the performance of this code?
I have two clips on a flash project. One of them is fixed and the other can be moved with the arrow keys of the keyboard. The two clips have irregular shapes, so HitTestObject and HitTestPoint does not work very well. I have a function that detects the collision of two clips using bitmap. I wanted to update the position of the Movie clip mobile so I put the function of collision detection under the ENTER_FRAME event listener code. It works fine, but when I add many fixed film clips (about 10 clips fixed in an image), the game (.swf file) becomes slower and slows down the performance of the PC. I thought that my collision detection function has a negative effect on the performance of the PC, so I used the class on this page: https://forums.adobe.com/thread/873737
but the same thing happens.You told me how to do to speed up execution of my codes?
Here's the part of my code:
stage.addEventListener (Event.ENTER_FRAME, myOnEnterFrame);
function myOnEnterFrame(event:Event):void
{
If (doThisFn) / / doThisFn is a variable to allow or prevent the kind of mobile film clip moved with arrow keys
{
If (left & &! right) {}
Player.x = speed;
Player.rotation = player.rotation - speed;
}
If (right & &! left) {}
Player.x += speed;
Player.rotation = player.rotation + speed;
}
If (up & &! down) {}
Player.y = speed;
}
If (down & &! up) {}
Player.y += speed;
}
The clips of film sets are wall1, wall2, wall3, wall4,... and so on
the following code checks to see how many walls exist on each image and pushes them in table wallAfor (var i: int = 0; i < 1000; i ++) / / you can put up to 1000 object of wall in the table wallA
{
If (this ['wall' + i]) / / if the wall object exists, push it into the table wallA
{
wallA.push (this, ['wall' + i]);
}
}
for (i = 0; i < wallA.length; i ++)
{
If ( h.hitF (player, wallA [i]) | gameOverTest) / / this code checks whether or not the player (the mobile clip) hit the walls
{
trace ("second try");
gameOver.visible = true;
doThisFn = false;
}
}
I think the following codes are easy to turn and run. I think that the performance problem is due to previous codes.
If (player.hitTestObject (door))
{
Win.Visible = true;
doThisFn = false;
}
If (key) / / if there is a key on chassis
{
If (player.hitTestObject (key))
{
Key.Visible = false;
switch (currentFrame)
{
case 4:
wallA [0] .visible = false;
.x wallA [0] = 50000;
break;
case 5:
wall14. Play();
wall8.x = 430;
break;
}
}
}
}
}
It's a simple question that doesn't usually have a simple answer.
Here is an excerpt of a book (Flash game development: in a Social, Mobile and 3D world) I wrote.
Optimization techniques
Unfortunately, I don't know any way completely satisfactory to organize this information. In what follows, I discuss memory management first with sub-themes listed in alphabetical order. Then I discuss the management of CPU/GPU with subheadings listed in alphabetical order.
This may sound logical, but at least, there are two problems with this organization.
1. I don't think it's the most useful way to organize this information.
2. memory management affects the CPU/GPU use, so that everything in the section of memory management can also be listed in the section CPU/GPU.
In any case, I'll also list information in two other ways, from the easiest to the most difficult to implement and more for much less.
Two of these later inscriptions are subjective and dependent on experience developer and capabilities, as well as environmental test and the test situation. I very much doubt there would be a consensus on the order of these lists. However, I think that they are still valid.
Easier to the more difficult to implement
1. do not use the filters.
2. always use the reverse for loops and avoid loops and avoid while loops.
3. explicitly stop timers for their loan for gc (garbage collection).
4. use the weak event listeners and remove headphones.
5. strictly type variable when possible.
6. explicitly disable interactivity mouse when interactivity smile not necessary.
7. replace dispatchEvents with callback functions whenever possible.
8 it would be gc stop sounds for the sounds and SoundChannels.
9. use the DisplayObject most basic need.
10. always use cacheAsBitmap and cacheAsBitmapMatrix with air applications (i.e., mobile).
11. reuse of objects when possible.
12 Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
13. the pool instead of creating objects and gc objects ' ing.
14. use partial blitting.
15. use step blitting.
16 use Stage3D
Biggest advantage less
- Use the blitting Stadium (if there is enough memory system).
- Use Stage3D.
- Use partial blitting.
- Use cacheAsBitmap and cacheAsBitmapMatrix with mobile devices.
- Disable explicitly interactivity mouse when interactivity smile not necessary.
- Do not use filters.
- Use the most basic necessary DisplayObject.
- Reuse objects whenever possible.
- Event.ENTER_FRAME loops: use different listeners and different listener functions applied to DisplayObjects as little as possible.
- Use reverse for loops and avoid the do loops and while loops.
- The pool instead of creating objects and gc'ing.
- Strictly, type variable when possible.
- Use weak event listeners and remove headphones.
- Replace dispatchEvents by the callback functions whenever possible.
- Explicitly stop timers on loan for the gc.
16 stop sounds for the sounds and SoundChannels be gc would be.
-
How to recover the server response XML data
Hey fellows,
So I wrote this piece of code that sends an image to a server (thanks a lot Mantaker for the position you where has written on it!) and then I expect to receive a response in the form of XML code. I tried to use getResponseMessage(), which gives me a nice 'OK '.
How could I achieve this? I read somewhere that it might be possible through a feed, could you help me?
I'll give you a lot of congratulations!
If you already have the basics of an HttpConnection down, it gets a little easier later.
Once you have the your HttpConnection InputStream you can create a Document for analysis using the built-in XML parser.
public static Document getXmlDoc(InputStream in) { Document doc = null; DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder; try { docBuilder = docBuilderFactory.newDocumentBuilder(); docBuilder.isValidating(); doc = docBuilder.parse(in); doc.getDocumentElement().normalize(); } catch (Exception e) { System.out.println("getXmlDoc Error: " + e); } return doc; }
It is a basic function that I use to read a XML from a web server. If there are errors reading or parsing of the document, this function returns null.
After making sure that you close your InputStream, you can start reading your document.
-
How update just the day of a date value?
Example:
Table: FC_GQ_SOURCE_ANALYSIS
Sample_type = C
Effective_date = null
Sample_date = 20/13/07/14 09:00
Should that happen, it's for any analysis of the sample which has a 'C' sample_type we need for the entry into force the first day of the month for some months of the date of the sample is and keep the time that it is...
so in the example data, the entry into force should be 2013/07/01 09:00.
How to update only the part of the day of this string of date?
Hello
You don't need to convert it to a string and back to do. TRUNC allows to get the right day and date arithmetic to get the right time, like this:
UPDATE fc_gq_source_analysis
SET effective_date = TRUNC (sample_date, 'MONTH')
+ (sample_date - TRUNC (sample_date))
WHERE sample_type = 'C '.
;
TRUNC (sample_date, 'MONTH') is midnight the 1st of the month you want.
sample_date - TRUNC (sample_date) is the time you want, expressed in number of days (for example, 9/24 a day).
-
Hello
I was struck with an error by opening the xml file. Thanks for giving me your entries.
I use the pl/sql script for outbounding data in .xml format. But after you create the file successfully, I am not able to open it in Solution Explorer. The data with "&" in a column and it will be available in the data in many areas. Where as if I try to create the same report Oracle using "xml" as output, then I don't get this problem. And I am able to open the same in Explorer perfectly.
Here I am pasting the script that I created
create or replace the PROCEDURE GETXML_TAG (ERRBUT OUT VARCHAR2,
RETCODE OUT VARCHAR2,
P_DIR_NAME VARCHAR2)
IS
v_record_data varchar2 (4000): = null;
v_order_id varchar2 (50): = null;
v_order_date varchar2 (50): = null;
v_order_mode varchar2 (50): = null;
v_order_total varchar2 (50): = null;
v_file_dir varchar2 (100): = ' / usr/tmp ';
CURSOR cur_hdr IS
SELECT DISTINCT MINISTRY_CODE, DEPT_CODE, "ENTITY_CODE
OF XGBZ_FIN_STAGE_ACS
WHERE tx_timestamp IS NULL;
CURSOR cur_line (p_min_code IN VARCHAR2,
p_dept_code IN VARCHAR2) IS
SELECT seg_no,
seg_code,
TO_CHAR (seg_description) seg_description,
start_date,
End_date,
status,
disable_flag
OF xgbz_fin_stage_acs
WHERE tx_timestamp IS NULL
AND ministry_code = p_min_code
AND dept_code = p_dept_code;
BEGIN
v_filename: = 'GEBIZ_EPO ' | TO_CHAR (SYSDATE, 'DDMMYYYYHH24MI'): '. XML';
f_xml_file: = UTL_FILE. FOPEN (v_file_dir, v_filename, 'W');
v_record_data: = ' <? XML version = "1.0" encoding = "UTF-8"? > ';
UTL_FILE.put_line (f_XML_FILE, v_RECORD_DATA);
UTL_FILE.put_line (f_XML_FILE, '< GEBIZ_ACCOUNT_SEGMENT >');
dbms_output.put_line (' step 1 ' | v_file_dir |) » -'|| v_filename);
FOR cur_hdr_rec IN cur_hdr
LOOP
dbms_output.put_line ('step 2');
UTL_FILE.put_line (f_XML_FILE, '< HEADER >');
UTL_FILE.put_line (f_XML_FILE, '< MINISTRY_CODE >' | cur_hdr_rec.ministry_code | / MINISTRY_CODE > ');
UTL_FILE.put_line (f_XML_FILE, '< DEPT_CODE >' | cur_hdr_rec.dept_code | / DEPT_CODE > ');
UTL_FILE.put_line (f_XML_FILE, '< ENTITY_CODE >' | cur_hdr_rec.entity_code | / ENTITY_CODE > ');
UTL_FILE.put_line (f_XML_FILE, ' < / header > ');
FOR cur_line_rec IN cur_line (cur_hdr_rec.ministry_code, cur_hdr_rec.dept_code)
LOOP
dbms_output.put_line ('step 3');
UTL_FILE.put_line (f_XML_FILE, '< DETAILS >');
UTL_FILE.put_line (f_XML_FILE, '< SEGEMENT >');
UTL_FILE.put_line (f_XML_FILE, '< NUMBER >' | cur_line_rec.seg_no |) ("< / NUMBER >");
UTL_FILE.put_line (f_XML_FILE, '< CODE >' | cur_line_rec.seg_no |) "< code >');
UTL_FILE.put_line (f_XML_FILE, '< DESCRIPTION >' | cur_line_rec.seg_description | / DESCRIPTION > ');
UTL_FILE.put_line (f_XML_FILE, '< START_DATE >' | cur_line_rec.start_date | / START_DATE > ');
UTL_FILE.put_line (f_XML_FILE, '< end_date >' | cur_line_rec.end_date | / end_date > ');
UTL_FILE.put_line (f_XML_FILE, '< STATUS >' | cur_line_rec.status | / STATUS > ');
UTL_FILE.put_line (f_XML_FILE, '< DELETE_FLAG >' | cur_line_rec.disable_flag | / DELETE_FLAG > ');
UTL_FILE.put_line (f_XML_FILE, '< /SEGEMENT >');
UTL_FILE.put_line (f_XML_FILE, ' < / DETAILS > ');
END LOOP;
END LOOP;
dbms_output.put_line ('step 4');
UTL_FILE.put_line (f_XML_FILE, ' < / GEBIZ_ACCOUNT_SEGMENT > ');
UTL_FILE. FCLOSE (f_XML_FILE);
EXCEPTION
WHEN UTL_FILE. INVALID_OPERATION THEN
dbms_output.put_line (' invalid operation for ' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. INVALID_PATH THEN
dbms_output.put_line (' no access path is valid for ' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. INVALID_MODE THEN
dbms_output.put_line (' Mode is not valid for ' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. INVALID_FILEHANDLE THEN
dbms_output.put_line (' invalid file descriptor ' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. WRITE_ERROR THEN
dbms_output.put_line (' Error Invalid write ' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. READ_ERROR THEN
dbms_output.put_line ('Invalid Read Error' | v_filename);
UTL_FILE. FCLOSE_ALL;
WHEN UTL_FILE. INTERNAL_ERROR THEN
dbms_output.put_line ("'Internal Error");
UTL_FILE. FCLOSE_ALL;
WHILE OTHERS THEN
dbms_output.put_line (' error ' |') SQL CODE: ' | SQLCODE. ' Message: '. SQLERRM);
UTL_FILE. FCLOSE_ALL;
END GETXML_TAG;
/
The file that I am generating at the server level:
EPO150320111915. XML
<? XML version = "1.0" encoding = "UTF-8"? >
< GEBIZ_ACCOUNT_SEGMENT >
< HEADER >
RPO < MINISTRY_CODE > < / MINISTRY_CODE >
< DEPT_CODE > 000 < / DEPT_CODE >
< ENTITY_CODE > < / ENTITY_CODE >
< / Header >
< DETAILS >
< SEGEMENT >
< NUMBER > 1 < / NB >
< CODE > 1 </postcode >
< DESCRIPTION > Republic Polytechnic < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
Operating grant < DESCRIPTION > < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev Grant-renovation Campus Temp Temp < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev renovation Grant to hand Campus Temp < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev Grant-IT for Campus Temp < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev Grant-Land Premium for Campus Woodlands < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev-Grant-pre-construction of the Woodlands Campus < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > Dev Grant-FE < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > tax exempt student Dev Welfare Fund < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > funds tax exempt-Dev project < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 2 < / NB >
< CODE > < code > 2
< DESCRIPTION > reserved finance < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
Library < DESCRIPTION > < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > Office of academic affairs < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > the Corporate Communications Office < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
Office of the Assistant Director of the < DESCRIPTION > < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > the estates Office < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > finance < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > Office of human resources < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< DETAILS >
< SEGEMENT >
< NUMBER > 3 < / NB >
< CODE > < code > 3
< DESCRIPTION > Office of industrial and international Services < / DESCRIPTION >
< START_DATE > < / START_DATE >
< end_date > < / end_date >
A <>STATUS < / STATUS >
< DELETE_FLAG > < / DELETE_FLAG >
< / SEGEMENT >
< / DETAILS >
< / GEBIZ_ACCOUNT_SEGMENT >
-end of file
I'm able to correctly edit in Notepad, when tried to open, at the level of the Solution Explorer, its not allow me due to '& '.
Pls confirm what could be the problem.
Concerning
Mr. NagendraHi Nagendra,
Pls confirm what could be the problem.
In a document valid XML, characters like <,>, &, "and" must be escaped using entity references if they appear in the text or attribute nodes.
For example, & must be escaped to "& amp;"Did you check my answer on your previous thread on the generation of XML?
http://forums.Oracle.com/forums/thread.jspa?threadID=2184907&TSTART=30The method that you are trying to use is obsolete (since Oracle 9i) and also produces invalid XML content.
Here, I think that the more flexible method is to use the SQL/XML functions.
Try the following, based on the example you posted, it should give you the expected result:,>{code}
DECLAREv_out CLOB.
v_filename VARCHAR2 (300): = 'GEBIZ_EPO ' | TO_CHAR (sysdate, 'DDMMYYYYHH24MI'): '. XML';
v_prolog VARCHAR2 (40): = '';BEGIN
SELECT xmlserialize (document
XmlElement ("GEBIZ_ACCOUNT_SEGMENT"
xmlagg)
XMLCONCAT (hdr, dtls)
)
)
as dash clob size = 2
)
IN v_out
DE)
SELECT xmlelement ("HEADER"
xmlelement ("MINISTRY_CODE", ministry_code)
xmlelement ("DEPT_CODE", dept_code)
xmlelement ("ENTITY_CODE", entity_code)
) hdr
xmlagg)
XmlElement ("DETAILS"
xmlelement ("SEGMENT"
xmlelement ("NUMBER", seg_no)
xmlelement ('CODE', seg_no)
xmlelement ("DESCRIPTION", seg_description)
xmlelement ("START_DATE", start_date)
xmlelement ("end_date", end_date)
xmlelement ("STATUS", status)
xmlelement ("DELETE_FLAG", disable_flag)
)
)
) dtls
OF xgbz_fin_stage_acs
WHERE tx_timestamp is null
GROUP OF ministry_code, dept_code, entity_code
)
;DBMS_XSLPROCESSOR.clob2file (v_prolog | v_out, 'TEST_DIR', v_filename, nls_charset_id ('AL32UTF8'));
END;
/
{code}-A single SQL query to retrieve data and format in XML (necessary character escape is automatically supported).
-A single call to DBMS_XSLPROCESSOR.clob2file to create the file in the directory TEST_DIR.Hope that helps.
-
How to hide the icon browser mode code code? DW CS5
Hey all,.
Is there an easy way to disable the browser code in code view icon? He likes to appear at the most inopportune times and mask the parts of my code from me. Do I have to disable the ToolTips 'everything '? Help, please. Thank you.
I turn off until I need it.
http://forums.Adobe.com/message/2829663#2829663
Nancy O.
ALT-Web Design & Publishing
Web | Graphics | Print | Media specialists
http://ALT-Web.com/
http://Twitter.com/ALTWEB -
HTTPService read only not update xml, I had manually update the xml code in my browser
I called a HTTPService (id = data2php) that runs a php script that creates an xml doc and put it on my server. I then called another HTTPService (id = feedRequest) that reads the xml document, then I try to fill a datagrid with the lastResult my HTTPService that reads the xml doc. My question is that the HTTPService that reads the xml doc reads the previous incarnation of the doc xml, not the newly created that created my HTTPService (data2php). I've been manually the xml doc is going in my browser and hit refresh for my HTTPService feedRequest to read the updated xml code.
Here is the mxml for the httpservice that reads the xml file:
"" < mx:HTTPService id = "feedRequest" url = " http://cfcdi.org/eric/dashboard/php/sales.xml" result = "feedResult (event)" resultFormat = "xml" useProxy = "false" / > "
pretty simple.
(in fact, from time to time it will read the updated)N ° dummy Variable like this:
-
After the installation of Vista update, receive the error code 21 with printer software
Remember - this is a public forum so never post private information such as numbers of mail or telephone!
Ideas
Download update for 32-bit Vista because brother MFC3220C box to restart the printer says cannot start error box App Installer says error code ['C:\USA\Install\3220C\Inst32.exe'] 21. I added Vista Ultimate 32 bit. I went to the brother site and talked to technicians and as usual runaround says I need to update with the new printer (Yes, well, well, if I do it will of course not brother!)
* original title - printing with printer Brother MFC3220C problem. When I install the update to run 32-bit Vista; I get to the part of the installation where I plug the USB cable and the printer software will block upward. I get a code on the reboot error code ['C:\USA\Install\3220C\Inst32.exe'] 21 *.
John Walker
You must get your drivers for your Brother printer if possible from the manufacturer.
Anything here useful?
There is also a uninstall tool mentioned that you can use to reinstall through Windows plug-and-play.
Harold Horne / TaurArian [MVP] 2005-2011. The information has been provided * being * with no guarantee or warranty.
-
I did a systematic update of the CC PS and PS now seems to work but the bridge is not. I get a "CC could not update" and an error code 72. What is the best solution?
Thank you for your message. I'm finally hung up with Adobe cat and after about 2 hours, the problem has been resolved. Part of the problem was a corrupted Microsoft files.
Ed
Maybe you are looking for
-
Videos YouTube are black when you use the HTML5 player.
Today when I booted up my laptop, Firefox would not play any YouTube video - audio still works and the preview of the image when the research is there, but instead of the video there is just a black screen. I have NO intention to install Flash Player
-
Why FF act as if each start is a new installation and hang on to old tabs?
I updated Firefox to version 8.0.1 to 9.0.1 about an hour ago, and it has been wrong since. I suspect it's a matter of preference, but I'm not sure. Every time I have start FF (or restart), he seems to think that this is the first time, it was run /
-
computer laptop-17-P106na: Wifi problems
Hello, I was wondering if anyone can help, I recently bought this laptop and my wifi keeps disconnecting, my old work laptop perfectly fine. I went through every possible troubleshooting advice and it still won't work. Thank you in advance.
-
HP G72-259wm: white screen
I have a white screen when I start my HP G72. The fan works and the lights on the keyboard work. I tried the hard reset without the battery and still nothing. I would like to connect the computer to my TV to see if that works but you read the setting
-
Drivers sound and graphics for Satellite P200-1EE and Windows XP
Hi all I just bought a new Sattelite P200-1EE. I had downgraded it to Windows XP Service Pack 2. Vista.I have two problems: 1. I can't find the graphics driver for the ATI Radeon Mobility HD2600 for Windows XP. When I hit the link,I get a "cannot con