SQL Worksheet Export to XML Encoding?
The first line of my XML file is <?xml version='1.0' encoding='Cp1252' ?>
SQL Developer release 4.1
Oracle DB 9i Release 2.
1) In the SQL Worksheet I did a SELECT * on a table.
2) In the Results panel I did a right click
3) I clicked on Export
4) I selected XML
5) I entered a file name.
6) I clicked the Apply button.
7) Internet Explorer cannot open the file with an error that the system does not support this encoding.
Why is SQL Developer producing this encoding?
How do I get rid of this so I can open the XML file?
Mike
Changing it to ASCII made it such that IE can open the file. Why did the default encoding change from one version to the next?
Mike
Similar Messages
-
Export large xml file in PL/SQL
How to export large or big xml (XMLTYPE) into file system.
I have tried with...
1. UTL_FILE.PUT -- it has a limitation of 32767 chars
2. DBMS_XSLPROCESSOR.CLOB2FILE supports little more than UTL_FILE but not in MB's
i'm looking for options to export a xml file which is more than 5mb
any suggestions?user12020576 wrote:
I have tried with...
1. UTL_FILE.PUT -- it has a limitation of 32767 chars
It might have but this is not a problem, if you programmatically break it up in pieces.
Have a look at https://forums.oracle.com/message/9748097#9748097
The method demonstrates how to dump/write a CSV in binary format to disk.
I used it to dump/write files way bigger than 10++ MB in size... -
What XML encoding do I use to get APEX to import an XML file?
Environment:
APEX 3.1.1.00.09 on AIX 5.3
SQL Developer 1.5.5 on Windows XP Pro SP3
Oracle 10.2.0.2 EE on AIX 5.3
Trying to import an XML file generated from SQL Developer into a table using APEX Import utility.
I'm getting the error: ORA-19200: Invalid column specification
All I've done is exported the EMP table from SQL Developer (v. 1.5.5) into an XML file and then tried to load into an empty EMP table in the database (10.2.0.2) using APEX and the Data Load Utility.
I've tried creating the XML file using different encodings out of SQL Developer but so far an still getting the above error.
Any help is greatly appreciated.
-garyHi Scott
First of all I was successful in exporting and re-importing the EMP table to and from APEX.
When I exported the EMP table in XML format using SQL Developer, the resulting XML looked very different from the same data exported from APEX. My APEX exported XML looked just like yours. Here are the first 3 rows of the XML file exported from SQL Developer. I'm NOT an XML person so I can't judge whether or not this is valid XML but I can tell you that it doesn't import into an empty EMP table through APEX. I can control the encoding type in SQL Developer and have tried several different flavors.
<?xml version='1.0' encoding='UTF-8' ?>
<RESULTS>
<ROW>
<COLUMN NAME="EMPNO"><![CDATA[7876]]></COLUMN>
<COLUMN NAME="ENAME"><![CDATA[ADAMS]]></COLUMN>
<COLUMN NAME="JOB"><![CDATA[CLERK]]></COLUMN>
<COLUMN NAME="MGR"><![CDATA[7788]]></COLUMN>
<COLUMN NAME="HIREDATE"><![CDATA[12-JAN-83]]></COLUMN>
<COLUMN NAME="SAL"><![CDATA[1100]]></COLUMN>
<COLUMN NAME="COMM"><![CDATA[]]></COLUMN>
<COLUMN NAME="DEPTNO"><![CDATA[20]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="EMPNO"><![CDATA[7499]]></COLUMN>
<COLUMN NAME="ENAME"><![CDATA[ALLEN]]></COLUMN>
<COLUMN NAME="JOB"><![CDATA[SALESMAN]]></COLUMN>
<COLUMN NAME="MGR"><![CDATA[7698]]></COLUMN>
<COLUMN NAME="HIREDATE"><![CDATA[20-FEB-81]]></COLUMN>
<COLUMN NAME="SAL"><![CDATA[1600]]></COLUMN>
<COLUMN NAME="COMM"><![CDATA[300]]></COLUMN>
<COLUMN NAME="DEPTNO"><![CDATA[30]]></COLUMN>
</ROW>
<ROW>
<COLUMN NAME="EMPNO"><![CDATA[7521]]></COLUMN>
<COLUMN NAME="ENAME"><![CDATA[WARD]]></COLUMN>
<COLUMN NAME="JOB"><![CDATA[SALESMAN]]></COLUMN>
<COLUMN NAME="MGR"><![CDATA[7698]]></COLUMN>
<COLUMN NAME="HIREDATE"><![CDATA[22-FEB-81]]></COLUMN>
<COLUMN NAME="SAL"><![CDATA[1250]]></COLUMN>
<COLUMN NAME="COMM"><![CDATA[500]]></COLUMN>
<COLUMN NAME="DEPTNO"><![CDATA[30]]></COLUMN>
</ROW>
Maybe I should move this thread to the SQL Developer or XML forums.
If you have any other suggestions I would be most appreciative.
Thanks very much for your help.
-gary -
XML encoding to UTF-8 charset - Oracle 9i
Hi Masters
Database Version : 9i
Can you please help me here.. I am in a process of writing an Inventory Adjustment tool that will generate the XML and encode it to utf-8 charset…
I have successfully written the code to generate the XML in this format
<?xml version="1.0" encoding="ISO-8859-1" ?>
<InvAdjustDesc>
<dc_dest_id>323</dc_dest_id>
<InvAdjustDtl>
<item_id>12345678</item_id>
<adjustment_reason_code>383</adjustment_reason_code>
<unit_qty>4</unit_qty>
<from_disposition>ATS</from_disposition>
<to_disposition/>
<user_id>e7062159</user_id>
<create_date>
<year>2012</year>
<month>10</month>
<day>29</day>
<hour>14</hour>
<minute>59</minute>
<second>25</second>
</create_date>
<ww_liability_code>353</ww_liability_code>
<ww_ref_1/>
<ww_ref_2/>
<ww_tran_id>25863399875</ww_tran_id>
<ww_alloc_no/>
<ww_final_store>353</ww_final_store>
</InvAdjustDtl>
</InvAdjustDesc>
And now as part of the AIT requirement this XML needs to be encoded to utf-8 and look like this
<?xml version="1.0" encoding="UTF-8"?><RibMessages><ribMessage><family>InvAdjust</family><type>INVADJUSTCRE</type><id>54601557</id><ribmessageID>3</ribmessageID><publishTime>2012-10-29 15:03:12.000 SAST</publishTime><messageData><?xml version="1.0" encoding="ISO-8859-1" ?><InvAdjustDesc><dc_dest_id>323</dc_dest_id><InvAdjustDtl><item_id>12345678</item_id><adjustment_reason_code>383</adjustment_reason_code><unit_qty>4</unit_qty><from_disposition>ATS</from_disposition><to_disposition/><user_id>e7062159</user_id><create_date><year>2012</year><month>10</month><day>29</day><hour>14</hour><minute>59</minute><second>25</second></create_date><ww_liability_code>353</ww_liability_code><ww_ref_1/><ww_ref_2/><ww_tran_id>25863399875</ww_tran_id><ww_alloc_no/><ww_final_store>353</ww_final_store></InvAdjustDtl></InvAdjustDesc></messageData><customFlag>F</customFlag></ribMessage></RibMessages>
I am not quite familiar with xml encoding do you have any suggestion on how i can accomplish this?
ThanksHi Odie
I found a way of writing the encoded xml thanks for your help my man, much appreciated...
But now can you help me here this xml I am generating needs to be like the one at the bottom...
Here is my SQL I am using....
SELECT XMLELEMENT
("InvAdjustDesc"
,XMLFOREST
(inv.dc_dest_id AS "dc_dest_id"
,XMLFOREST
(NVL(inv.item_id, ' ') AS "item_id"
,NVL(inv.adjustment_reason_code, ' ') AS "adjustment_reason_code"
,NVL(inv.unit_qty, 0) AS "unit_qty"
,NVL(inv.from_disposition, ' ') AS "from_disposition"
,NVL(inv.to_disposition, ' ') AS "to_disposition"
,NVL(inv.user_id, ' ') AS "user_id"
,XMLFOREST(TO_CHAR(SYSDATE, 'yyyy') AS "year"
,TO_CHAR(SYSDATE, 'mm') AS "month"
,TO_CHAR(SYSDATE, 'dd') AS "day"
,TO_CHAR(SYSDATE, 'hh') AS "hour"
,TO_CHAR(SYSDATE, 'mi') AS "minute"
,TO_CHAR(SYSDATE, 'ss') AS "second"
) AS create_date
,NVL(inv.ww_liability_code, ' ') AS "ww_liability_code"
,NVL(inv.ww_ref_1, ' ') AS "ww_ref_1"
,NVL(inv.ww_ref_2, ' ') AS "ww_ref_2"
,NVL(inv.ww_tran_id, ' ') AS "ww_tran_id"
,NVL(inv.ww_alloc_no, ' ') AS "ww_alloc_no"
,NVL(inv.ww_final_store, ' ') AS "ww_final_store"
) AS InvAdjustDtl)) AS InvAdjustDesc
FROM invadjust inv
WHERE inv.dc_dest_id = 342
and rownum <= 3;
I need to have a leading <InvAdjustDesc> with a node <dc_dest_id> with repeating <InvAdjustDtl>
I did try to put XMLAGG to group all of my <InvAdjustDtl> nodes but the output I get is two entries of <InvAdjustDtl> as follows
<InvAdjustDesc>
<dc_dest_id>323</dc_dest_id>
<INVADJUSTDTL>
<InvAdjustDtl>
<item_id>20144791</item_id>
<adjustment_reason_code>6</adjustment_reason_code>
<unit_qty>-4</unit_qty>
<from_disposition>ATS</from_disposition>
<to_disposition />
<user_id>r7052891</user_id>
<CREATE_DATE>
<year>2012</year>
<month>10</month>
<day>31</day>
<hour>10</hour>
<minute>15</minute>
<second>44</second>
</CREATE_DATE>
<ww_liability_code>342</ww_liability_code>
<ww_ref_1 />
<ww_ref_2 />
<ww_tran_id>342021751178</ww_tran_id>
<ww_alloc_no />
<ww_final_store>342</ww_final_store>
</InvAdjustDtl>
<InvAdjustDtl>
<item_id>6009173222220</item_id>
<adjustment_reason_code>6</adjustment_reason_code>
<unit_qty>-1</unit_qty>
<from_disposition>ATS</from_disposition>
<to_disposition />
<user_id>r7052891</user_id>
<CREATE_DATE>
<year>2012</year>
<month>10</month>
<day>31</day>
<hour>10</hour>
<minute>15</minute>
<second>44</second>
</CREATE_DATE>
<ww_liability_code>342</ww_liability_code>
<ww_ref_1 />
<ww_ref_2 />
<ww_tran_id>342021751179</ww_tran_id>
<ww_alloc_no />
<ww_final_store>342</ww_final_store>
</InvAdjustDtl>
<InvAdjustDtl>
<item_id>2034180000008</item_id>
<adjustment_reason_code>6</adjustment_reason_code>
<unit_qty>-1</unit_qty>
<from_disposition>ATS</from_disposition>
<to_disposition />
<user_id>r7052891</user_id>
<CREATE_DATE>
<year>2012</year>
<month>10</month>
<day>31</day>
<hour>10</hour>
<minute>15</minute>
<second>44</second>
</CREATE_DATE>
<ww_liability_code>342</ww_liability_code>
<ww_ref_1 />
<ww_ref_2 />
<ww_tran_id>342021751180</ww_tran_id>
<ww_alloc_no />
<ww_final_store>342</ww_final_store>
</InvAdjustDtl>
</INVADJUSTDTL>
</InvAdjustDesc>cond>11</second>
</CREATE_DATE>
<ww_liability_code>342</ww_liability_code>
<ww_ref_1 />
<ww_ref_2 />
<ww_tran_id>342021751180</ww_tran_id>
<ww_alloc_no />
<ww_final_store>342</ww_final_store>
</INVADJUSTDTL>
</InvAdjustDesc>cond>11</second>
</CREATE_DATE>
<ww_liability_code>342</ww_liability_code>
<ww_ref_1 />
<ww_ref_2 />
<ww_tran_id>342021751180</ww_tran_id>
<ww_alloc_no />
<ww_final_store>342</ww_final_store>
</INVADJUSTDTL>
</InvAdjustDesc>
--------------------------------------Desired Output___________________
<?xml version="1.0" encoding="ISO-8859-1" ?>
<InvAdjustDesc>
<dc_dest_id>852</dc_dest_id>
<InvAdjustDtl>
<item_id>12345</item_id>
<adjustment_reason_code>989</adjustment_reason_code>
<unit_qty>4</unit_qty>
<from_disposition>ats</from_disposition>
<to_disposition>tst</to_disposition>
<user_id>w759862</user_id>
<create_date>
<year>2012</year>
<month>10</month>
<day>31</day>
<hour>09</hour>
<minute>14</minute>
<second>23</second>
</create_date>
<ww_liability_code>852</ww_liability_code>
<ww_ref_1/>
<ww_ref_2/>
<ww_tran_id>12358965</ww_tran_id>
<ww_alloc_no/>
<ww_final_store>323</ww_final_store>
</InvAdjustDtl>
<InvAdjustDtl>
<item_id>78952675</item_id>
<adjustment_reason_code>987</adjustment_reason_code>
<unit_qty>5</unit_qty>
<from_disposition>ats</from_disposition>
<to_disposition>asr</to_disposition>
<user_id>w7889526</user_id>
<create_date>
<year>2012</year>
<month>10</month>
<day>31</day>
<hour>09</hour>
<minute>15</minute>
<second>02</second>
</create_date>
<ww_liability_code>456</ww_liability_code>
<ww_ref_1/>
<ww_ref_2/>
<ww_tran_id>482665226</ww_tran_id>
<ww_alloc_no/>
<ww_final_store>456</ww_final_store>
</InvAdjustDtl>
</InvAdjustDesc> -
PBDOM : Exporting to XML file gives a single line
I've been starting developing with PowerBuilder 12.5 a few weeks ago. I had to write some XML files, so I got familiar with the PBDOM library.
I can build a lot of different things, it's very nice, but one thing still bothers me :
In the output file, the whole XML is written on a single line.
I use the SaveDocument function.
For example, here is some code :
PBDOM_Document doc
PBDOM_Element noderoot, node1, node11, node12
doc = CREATE PBDOM_Document
doc.NewDocument("NodeRoot")
noderoot = doc.GetRootElement()
node1 = CREATE PBDOM_Element
node1.SetName("Node1")
noderoot.AddContent(node1)
node1.SetAttribute("Attr", "AttrValue")
node11 = CREATE PBDOM_Element
node11.SetName("Node11")
node11.AddContent("Here is a value")
node1.AddContent(node11)
node12 = CREATE PBDOM_ELEMENT
node12.SetName("Node12")
node12.AddContent("Here is another value")
node1.AddContent(node12)
doc.SaveDocument("myDoc.xml")
Here is the result when I open it with notepad++
<NodeRoot><Node1 Attr="AttrValue"><Node11>Here is a value</Node11><Node12>Here is another value</Node12></Node1></NodeRoot>
Whereas I wanted :
<NodeRoot> <Node1 Attr="AttrValue"> <Node11>Here is a value</Node11> <Node12>Here is another value</Node12> </Node1> </NodeRoot>
With the notepad++ XML tools plugin, I can use the "pretty print" function to get this nice representation. But I would like my file to be formatted this way from the beginning. I noticed that the "line ending" was set to UNIX format (indicator on bottom right of the window), but I'm working on Windows. When I use the menu to convert it to Windows format (CR+LF), it changes this indicator, but the code stays on one single line.
Is there a way to tell PBDOM to export the XML file with a nice output ?
Thank you !
Notes :
- Opening the XML file with Internet Explorer or Google Chrome gives me a nice vizualisation, with indentation, line breaks...
- Adding a <?xml version="1.0" encoding="ISO-8859-1" ?> does not help (I've been doing it while exporting some more complex files, but I still get the output on one line...)Here is a very simple powerbuilder example. It uses MSXML instead of PBDOM. See my comments for hints how to use it with PBDOM.
oleobject lole_dom, lole_root, lole_element1, lole_element11, lole_element12
oleobject lole_Writer, lole_saxreader
string ls_result
// build DOM (you don't need this if you use PBDOM)
lole_dom = create oleobject
lole_dom.ConnectToNewObject ("Msxml2.DOMDocument")
lole_root = lole_dom.CreateElement ("NodeRoot")
lole_dom.documentElement = lole_root
lole_element1 = lole_dom.CreateElement("Node1")
lole_root.AppendChild(lole_element1)
lole_element1.SetAttribute("Attr", "AttrValue")
lole_element11 = lole_dom.CreateElement("Node11")
lole_element11.AppendChild (lole_dom.CreateTextNode("Here is a value"))
lole_element1.AppendChild(lole_element11)
lole_element12 = lole_dom.CreateElement("Node12")
lole_element12.AppendChild (lole_dom.CreateTextNode("Here is another value"))
lole_element1.AppendChild(lole_element12)
// this saves the DOM without formatting
//lole_dom.save ("d:\testxml.xml")
// this part is for formating
lole_Writer = create oleobject
lole_saxreader = create oleobject
lole_Writer.ConnectToNewObject ("MSXML2.MXXMLWriter")
lole_saxreader.ConnectToNewObject ("MSXML2.SAXXMLReader")
lole_Writer.omitXMLDeclaration = True
lole_Writer.indent = True
lole_saxreader.contentHandler = lole_Writer
// instead of DOM you can also put a XML string to parser: lole_saxreader.parse ("<node>...</node>")
// so you can also use the PBDOM output directly
lole_saxreader.parse (lole_dom)
// here is your formatted output
ls_Result = lole_Writer.output
MessageBox ("", ls_result)
lole_writer.Disconnectobject( )
lole_saxreader.Disconnectobject( )
lole_dom.Disconnectobject( )
DESTROY lole_writer
DESTROY lole_saxreader
DESTROY lole_dom -
IsSchemaValid does chang the xml-encoding header from UTF-8 to WINDOWS-1252
I found the following effect:
isSchemaValid does changing the encoding - entry of the xml-file-header
generating xml-file by using DBMS_XMLGEN :
xmldoc := DBMS_XMLGEN.getXML(ctx);
with the header of the file is
<?xml version="1.0" encoding="UTF-8"?>
change the xmldoc to a xmlType
and validate it against the schema
xmldoc_xmlType:=(xmltype(xmldoc)) ;
xmldoc_xmlType.isSchemaValid ( bSchemalocation)
after this the header of the file is
<?xml version="1.0" encoding="WINDOWS-1252"?>
my DB:
R11_2_0_2 / Windows 64
the same in
R11_2_0_1 / Windows 32
select name, value from v$parameter where upper(name) like '%NLS%'
nls_calendar
nls_comp BINARY
nls_currency
nls_date_format
nls_date_language
nls_dual_currency
nls_iso_currency
nls_language AMERICAN
nls_length_semantics BYTE
nls_nchar_conv_excp FALSE
nls_numeric_characters
nls_sort
nls_territory AMERICA
nls_time_format
nls_timestamp_format
nls_timestamp_tz_format
nls_time_tz_format
register my schema by:
dbms_xmlschema.registerSchema(
schemaurl => vschemaurl,
schemadoc => xsd_file,
local => FALSE,
gentypes => TRUE,
genbean => FALSE,
gentables => TRUE,
force => FALSE,
owner => dbuser
,CSID => nls_charset_id('AL32UTF8')
How can I let or change back the xml-encoding entry to UTF-8 ?
regardsYour solution should not be relied upon...
C:\Temp>sqlplus /nolog @t1 %CD%
SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 4 09:41:32 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> spool testcase.log
SQL> --
SQL> connect sys/oracle as sysdba
Connected.
SQL> --
SQL> set define on
SQL> set timing on
SQL> --
SQL> def XMLDIR = &1
SQL> --
SQL> def USERNAME = XDBTEST
SQL> --
SQL> def PASSWORD = &USERNAME
SQL> --
SQL> def USER_TABLESPACE = USERS
SQL> --
SQL> def TEMP_TABLESPACE = TEMP
SQL> --
SQL> drop user &USERNAME cascade
2 /
old 1: drop user &USERNAME cascade
new 1: drop user XDBTEST cascade
User dropped.
Elapsed: 00:00:00.24
SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
2 /
old 1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
new 1: grant create any directory, drop any directory, connect, resource, alter session, create view to XDBTEST identified by XDBTEST
Grant succeeded.
Elapsed: 00:00:00.07
SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
2 /
old 1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
new 1: alter user XDBTEST default tablespace USERS temporary tablespace TEMP
User altered.
Elapsed: 00:00:00.00
SQL> set long 100000 pages 0 lines 256 trimspool on timing on
SQL> --
SQL> connect &USERNAME/&PASSWORD
Connected.
SQL> --
SQL> create or replace directory XMLDIR as '&XMLDIR'
2 /
old 1: create or replace directory XMLDIR as '&XMLDIR'
new 1: create or replace directory XMLDIR as 'C:\Temp'
Directory created.
Elapsed: 00:00:00.00
SQL> create table XML_DEFAULT of XMLTYPE
2 /
Table created.
Elapsed: 00:00:00.11
SQL> create table XML_CLOB of XMLTYPE
2 XMLTYPE store as CLOB
3 /
Table created.
Elapsed: 00:00:00.01
SQL> select *
2 from nls_database_parameters
3 where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET')
4 /
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CHARACTERSET AL32UTF8
Elapsed: 00:00:00.02
SQL> declare
2 XML_DEFAULT XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
3 XML_CLOB XMLType := xmltype('<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>') ;
4 begin
5 delete XML_DEFAULT;
6 delete XML_CLOB;
7 insert into XML_DEFAULT values (XML_DEFAULT);
8 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT.xml');
9 IF XML_DEFAULT.isSchemaValid ( 'SCHEMALOCATION_DOES_NO_MATTER_FOR_TEST_CASE.XSD', 'SCHEMA_NO_MATTER') = 1 THEN null; ELSE null; END IF;
10 commit;
11 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_IS_VALID.xml',nls_charset_id('WE8MSWIN1252'));
12 dbms_xslprocessor.clob2file( XML_DEFAULT.getclobval() , 'XMLDIR','XML_DEFAULT_WIN1252.xml');
13 insert into XML_CLOB values (XML_CLOB);
14 dbms_xslprocessor.clob2file( XML_CLOB.getclobval() , 'XMLDIR','XML_CLOB.xml');
15 commit;
16 end ;
17 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.27
SQL> --
SQL> host type XML_DEFAULT.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_IS_VALID.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_DEFAULT_WIN1252.xml
<?xml version="1.0" encoding="UTF-8"?>
<TEST>SELECT</TEST>
SQL> --
SQL> host type XML_CLOB.xml
<?xml version="1.0" encoding="WINDOWS-1252"?><TEST>SELECT</TEST>
SQL> --
SQL>First, the character set changes because isSchemaValid() causes the document to be parsed and converted to the internal database character set, as does storing it in a table.
It appear that your solution works in SQL because the semantics of SQL are such that it causes a 'copy' of the XMLType to take place before running the isSchemaValid() processing, were we to optimize away that copy as a result of a patch or performance optimization project then you solution would break...
If you want the output in a particular character set you should force that using XMLSerialize or getBlobVal(charsetid). Unfortunately we don't have a convience method for writing BLOBS on DBMS_XSLPROCESSOR... -
SQL Developer 31EA1 SQL Worksheet not allowing entry
When select to open a new SQL worksheet or having open a worksheet on connection, the system will bring up a new tab with the blue shading. It stops at that point. I can not enter anything and if I try and do other tasks, even exit Developer, I get a connection busy error message. If I try and click the try again button it just keeps reappearing. If I click the abort and try and do anything els I get the error again. I have to go to task manager and kill the task to get out of SQL developer. I am using Windows XP, JAVA 1.6.0_26 32 bit versions. Everything was working when I was using 3.0.
Hi,
See this post for the likely problem:
Re: SQL Developer 3.1EA1 JAVA Error During Export
Regards,
Gary
SQL Developer Team -
hi,
I am getting the following error while exporting to xml
please can neone help
thanks in advance
ORA-06502: PL/SQL: numeric or value error: character to number conversion errorThere is an error because a character is trying to be converted to a number?
Check your inserts and data types are correct. -
Address book data is XML-encoded in LDAP ?
Hi,
We are trying to find out how address book data is stored in the LDAP, and we've found several different ways apparently. Some format seems to use an XML encoded format (this is when you go in the UWC (JES5) and add a new group and in stead of selecting contacts to add, you just type a name, and an email address).
This is how it looks like in the ldap:
absi@nagios ~/ $ ldapsearch -D "cn=Directory manager" -w Jxxxxxxxxxx -b "o=PiServerDb" -h 192.168.xxx.50 "displayname=test_manueel"
version: 1
dn: piEntryID=e115cc045b373f,piPStoreOwner=adresboekadmin,o=xxxxxxxxxxxxxxt.be
,o=PiServerDb
piEntryID: e115cc045b373f
objectClass: PITYPEGROUP
objectClass: piEntry
objectClass: top
memberOfPIBook: e114db3c213216f6
displayName: test_manueel
pipEntryXMLData:: PG9saT4KIDxHcm91cEV4TWVtYmVyPnRlc3QzJTVFU01UUCU1RXRlc3QzJTQ
wdmxhYW1zcGFybGVtZW50LmJlPC9Hcm91cEV4TWVtYmVyPgogPEdyb3VwRXhNZW1iZXI+a2llcmV
3aWV0JTVFU01UUCU1RWtpZXJld2lldCU0MHZsYWFtc3BhcmxlbWVudC5iZTwvR3JvdXBFeE1lbWJ
lcj4KIDxHcm91cEV4TWVtYmVyPnRlc3Q0NSU1RVNNVFAlNUV0ZXN0NDUlNDBhYnNpLmJlPC9Hcm9
1cEV4TWVtYmVyPgo8L29saT4K
However, I can't find any usable reference to this ldap attribute 'pipEntryXMLData' , except that it's used by JES 2005Q1 onwards
I'm also concerned by the following:
- in case of problems, are there tools to read out / export this XML data in anything that is human readable / parseable ?
- what about scalability, we will be having members with thousands of entries in their addressbook, is this method scalable or will we be experiencing delays when users are looking up contacts in their address books ?
All info on this is more than welcom!
regards,
Tom.The ldapsearch tools are producing LDIF format (RFC 2849) which requires that non ascii values and values with some specific characters be Base64 encoded.
XML is out of these formats that start with a special character with regards to LDIF ('<') and for which values must be base64 encoded.
There are many decoders for base64 encoding.
Alternately, you can use an LDAP API (C or Java) and the value will not be encoded.
Regards,
Ludovic. -
Address book data is XML-encoded ?
Hi,
We are trying to find out how address book data is stored in the LDAP, and we've found several different ways apparently. Some format seems to use an XML encoded format (this is when you go in the UWC (JES5) and add a new group and in stead of selecting contacts to add, you just type a name, and an email address).
This is how it looks like in the ldap:
absi@nagios ~/ $ ldapsearch -D "cn=Directory manager" -w Jxxxxxxxxxx -b "o=PiServerDb" -h 192.168.xxx.50 "displayname=test_manueel"
version: 1
dn: piEntryID=e115cc045b373f,piPStoreOwner=adresboekadmin,o=xxxxxxxxxxxxxxt.be
,o=PiServerDb
piEntryID: e115cc045b373f
objectClass: PITYPEGROUP
objectClass: piEntry
objectClass: top
memberOfPIBook: e114db3c213216f6
displayName: test_manueel
pipEntryXMLData:: PG9saT4KIDxHcm91cEV4TWVtYmVyPnRlc3QzJTVFU01UUCU1RXRlc3QzJTQ
wdmxhYW1zcGFybGVtZW50LmJlPC9Hcm91cEV4TWVtYmVyPgogPEdyb3VwRXhNZW1iZXI+a2llcmV
3aWV0JTVFU01UUCU1RWtpZXJld2lldCU0MHZsYWFtc3BhcmxlbWVudC5iZTwvR3JvdXBFeE1lbWJ
lcj4KIDxHcm91cEV4TWVtYmVyPnRlc3Q0NSU1RVNNVFAlNUV0ZXN0NDUlNDBhYnNpLmJlPC9Hcm9
1cEV4TWVtYmVyPgo8L29saT4K
However, I can't find any usable reference to this ldap attribute 'pipEntryXMLData' , except that it's used by JES 2005Q1 onwards
I'm also concerned by the following:
- in case of problems, are there tools to read out / export this XML data in anything that is human readable / parseable ?
- what about scalability, we will be having members with thousands of entries in their addressbook, is this method scalable or will we be experiencing delays when users are looking up contacts in their address books ?
All info on this is more than welcom!
regards,
Tom.Hi,
tom_absi wrote:
We are trying to find out how address book data is stored in the LDAP, and we've found several different ways apparently. Some format seems to use an XML encoded format (this is when you go in the UWC (JES5) and add a new group and in stead of selecting contacts to add, you just type a name, and an email address).This isn't surprising as there wasn't any pre-existing attribute which could be used to add these values. So it appears they are using an XML 'blob' instead.
This is how it looks like in the ldap:
pipEntryXMLData:: PG9saT4KIDxHcm91cEV4TWVtYmVyPnRlc3QzJTVFU01UUCU1RXRlc3QzJTQ
wdmxhYW1zcGFybGVtZW50LmJlPC9Hcm91cEV4TWVtYmVyPgogPEdyb3VwRXhNZW1iZXI+a2llcmV
3aWV0JTVFU01UUCU1RWtpZXJld2lldCU0MHZsYWFtc3BhcmxlbWVudC5iZTwvR3JvdXBFeE1lbWJ
lcj4KIDxHcm91cEV4TWVtYmVyPnRlc3Q0NSU1RVNNVFAlNUV0ZXN0NDUlNDBhYnNpLmJlPC9Hcm9
1cEV4TWVtYmVyPgo8L29saT4KThis is base64 encoded and decodes as (http://www.opinionatedgeek.com/dotnet/tools/Base64Decode/):
<oli>
<GroupExMember>test3%5ESMTP%5Etest3%40vlaamsparlement.be</GroupExMember>
<GroupExMember>kierewiet%5ESMTP%5Ekierewiet%40vlaamsparlement.be</GroupExMember>
<GroupExMember>test45%5ESMTP%5Etest45%40absi.be</GroupExMember>
</oli> However, I can't find any usable reference to this ldap attribute 'pipEntryXMLData' , except that it's used by JES 2005Q1 onwardsAppears to be a 'private' attribute. Although you can access the data because it is stored in an LDAP server I don't believe it is a public interface so it is bound to change.
I'm also concerned by the following:
- in case of problems, are there tools to read out / export this XML data in anything that is human readable / parseable ?The base64 decoded version seems parseable to me?
- what about scalability, we will be having members with thousands of entries in their addressbook, is this method scalable or will we be experiencing delays when users are looking up contacts in their address books ?Assuming you have a sufficiently scoped/tuned directory server I don't see there is going to be a problem.
Regards,
Shane. -
UNICODE System - XML Encoding Error
Dear Experts,
We've upgraded our SAP system to ECC 6.0 Unicode. One of our applications works with XML files and we've been experimenting some problems with the XML encoding since the machine is Unicode enabled. In the XML structure we obtain strange chinesse characters:
This should be the right xml response:
<?xml version="1.0" encoding="utf-8"?><OpenHR><employee><id>69900004</id><name>Employee 1, Romania</name><orgName>Test ROMANIA</orgName><role>EMPLOYEE</role><flex>NO</flex><company>NE</company></employee><labels><label id="delegation">Delegations</label>
We obtain:
⸰㰿硭氠癥牳楯渽∱⸰u2220敮捯摩湧㴢畴昭㠢㼾㱏灥湈刾㱥浰汯祥放㱩搾㘹㤰〰〴㰯楤㸼湡浥㹅浰汯祥攠ㄬ⁒潭慮楡㰯湡浥㸼潲李慭放呥獴⁒位䅎䥁㰯潲李慭放㱲潬放䕍偌余䕅㰯牯汥㸼晬數㹎似⽦汥砾㱣潭灡湹㹎䕏㰯捯浰慮社㰯敭灬潹敥㸼污扥汳㸼污扥氠楤㴢摥汥条瑩潮∾䑥汥条瑩潮猼⽬慢敬㸼污扥氠楤㴢桥汰∾䡥汰㰯污扥氾㱬慢敬搽≩湣楤敮捥獔楴汥∾健牳潮湥氠䅤浩湩獴牡瑩潮㰯污扥氾㱬慢敬搽≮潄敬敧慴楯渢㹐汥慳攬整畲渠瑯睮慬敮摡爠楦⁹潵⁷慮琠瑯捣敳猠瑯敬敧慴楯湳㰯污扥氾㱬慢敬搽≮潴敃潮晩牭兵敳瑩潮∾偲敳猠慣捥灴映祯甠獨潵汤整琼
Here is the code where we guess the problem is (we have tried with differente encoding types: ISO-8859-1, UTF-8, UTF-16 and DEFAULT).
DATA: S_ENCODING_TYPE TYPE STRING,
ENCODING TYPE REF TO IF_IXML_ENCODING.
S_ENCODING_TYPE = 'iso-8859-1'.
ENCODING = IXML->CREATE_ENCODING( CHARACTER_SET = S_ENCODING_TYPE
BYTE_ORDER = 0 ).
CALL METHOD ODOCUMENT->SET_ENCODING
EXPORTING ENCODING = ENCODING.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = ODOCUMENT
IMPORTING
SIZE = ISIZERAW
TABLES
XML_AS_TABLE = IDATA
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
(IDATA is the variable where we see the chinesse text)It will not give you any effect to set up encoding because this function module sets its own encoding inside:
encoding = pixml->create_encoding( character_set = 'UTF-8' byte_order = 0 ).
Renderer is created by the kernel:
by kernel module abkm_iXML_CreateRenderer.
Something may be wrong with the installation. -
Dear All,
I a newby to XML and I have some questions, please (Oracle 10.2.0.1.0 on Windows 2003 32bit) :
1. I need to export an XML of the follow format having CRLF at the end of each record, but somehow I get only CR - where am I wrong? Here is a part of my code:
PROCEDURE my_xml
IS
doc dbms_xmldom.DOMDocument;
xdata XMLTYPE;
CURSOR xml_cur IS
SELECT xmlelement("ScheduleDay", .....
BEGIN
OPEN xml_cur;
FETCH xml_cur INTO xdata;
CLOSE xml_cur;
doc := dbms_xmldom.newDOMDocument(xdata);
dbms_xmldom.writeToFile(doc, 'UTL_XML/test.xml');
END;
2. I don't get <?xml version="1.0" > at the beginning of the XML result.
Thanks to all in advance!
The result example:
<?xml version="1.0" >
<ScheduleDay ScheduleDate="01-07-2008" SiteId="2">
<Computer ComputerId="1">
<Monitor MonitorId="1">
<Zone ZoneId="50">
<ObjectId>
<LocalTime>06:00:00.000</LocalTime>
<ScheduledDuration>00:00:19.000</ScheduledDuration>
<CommercialKey>BBH-FLBR306-030.MPG</CommercialKey>
<CommercialLink>http://xxx.xxx.xxx.xxx/zeev/E94C8B4D0D1BDEB6781B16156EFDE51F</CommercialLink>
<CommercialSize>23482372</CommercialSize>
</ObjectId>
<ObjectId>
<LocalTime>06:00:19.000</LocalTime>
<ScheduledDuration>00:00:19.000</ScheduledDuration>
<CommercialKey>BBH-VAMB001-030.MPG</CommercialKey>
<CommercialLink>http://xxx.xxx.xxx.xxx/zeev/231C30CE600A31F6EA66A07F76D75080</CommercialLink>
<CommercialSize>23482372</CommercialSize>
</ObjectId>
</Zone>
</Monitor>
</Computer>
</ScheduleDay>
Message was edited by:
kdwolfI'm wondering if you are hitting a bug that mdrake mentions but does not name in this thread (which also shows a work-around you may have to use). If you can, you may want to open a SR with Oracle to confirm the bug and see if there is a patch for your version.
XMLAGG cannot work in PL/SQL in UTL_FILE -
Extension API 1.5.1: How can i open a SQL Worksheet ?
Hi,
i try to build a simple Table API generator. Everything is finish. The only thing i need is open the generated sql script inside a SQL Worksheet for preview. I try following code:
RaptorDBAddin.getSqlOpener().openNewEditor("select sysdate from dual;", getDBObject().getConnectionName());
But i get following compile error:
Error(32,9): class oracle.ide.db.model.SqlNode not found in class de.team.sqldev.generator.GenerateAction
My extension.xml looks like:
<extension id="team.sqldevgenerator" version="1.0" esdk-version="1.0"
rsbundle-class="team.sqldevgenerator.Res"
xmlns="http://jcp.org/jsr/198/extension-manifest">
<name>team.sqldeveloper.generator</name>
<dependencies>
*<import>oracle.ide</import>*
*<import>oracle.sqldeveloper</import>*
*<import>oracle.javacore</import>*
</dependencies>
<hooks>
<feature-hook>
<description>This Extension provide generation of database objects based on table definition such like sequence, trigger, table-api-package</description>
</feature-hook>
<jdeveloper-hook xmlns="http://xmlns.oracle.com/jdeveloper/1013/extension">
<addins>
<addin>de.team.sqldev.generator.GeneratorAddin</addin>
</addins>
</jdeveloper-hook>
<sqldev-navigator-hook xmlns="http://xmlns.oracle.com/sqldeveloper/sqldev-navigator">
<descriptor>/de/team/sqldev/generator/table.xml</descriptor>
</sqldev-navigator-hook>
</hooks>
</extension>If the WMVs don't contain DRM, use a product such as VLC.
If the WMVs do contain DRM, no Mac OS X software will open or convert them.
(120714) -
SQL Worksheet - Script output is restricted to 5000 rows
Hello,
till now only 5000 rows are currently supported in a script results.
I have read, this count will be a preference in future releases. Is there such a release and if "yes" how can I change this count of rows?
Script Output of SQL Worksheet is the only possibility in SQL Developer I know, to export data from a query, that is a join of multiple tables, into flat file. Is there another one?
Thanks,
TzonkaYou can run your query as a statement (F9) and the results will be displayed in the Results tab. In the Results tab, you can right-click, select Export and then Text. This will allow you to export the results of the query into a text file (or the clipboard). This will enclose values with " and separate with tabs (allowing alternatives is another "wait for a later release" function).
This will produce the equivalent output of creating the view and exporting the data from the view tab as suggested by Sharon, without having to go to the effort of creating the view.
If by "flat file" you mean exactly what you would get with a spool from SQL*Plus, then the Script tab is your only option and you are restricted to the 5000 rows. -
See [1.1.1.25.14] Backspace key doesn't work in SQL Worksheet
The same problem still applies to build 1.1.2.25.79, only this time, for added fun, the suggested workaround of editing
<sqldeveloper_home>\sqldeveloper\system\oracle.ide.1.1.2.25.79\settings.xml
doesn't work either. I'm well and truly stuck now.
Message was edited by:
user545045Just to add weight to the "it doesn't default to
[0]", on my installation it is [8] and I have never
had problems with the backspace.Interesting, if I do a clean install (just unzipping sqldeveloper-1.1.2.2579-no-jre.zip to a random dir, starting up sqldeveloper.exe, pointing it to my j2sdk and ignoring the 'migrate settings from previous release' dialog) the \sqldeveloper\system\oracle.ide.1.1.2.25.79 remains empty until I shut down SQL Developer.
During shutdown, 8 files are created in this dir, one of which is settings.xml. Low and behold the contents:
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">Ide.LAST_EDIT_CMD_ID</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">[0]</Item>
</data>
</second>
</Item>
<Item class="oracle.javatools.util.Pair">
<first class="java.lang.String">delete-previous</first>
<second class="oracle.ide.keyboard.KeyStrokes">
<data>
<Item class="javax.swing.KeyStroke">[0]</Item>
</data>
</second>
</Item>
Message was edited by:
user545045
Maybe you are looking for
-
Safari 3.0.4 Quit unexpectedly
*The problem Begin with Safari 3.0, so i went back to Safari 2.0.4.* *Then last week i updated to 10.4.11 and Safari 3.0.4, it quit unexpectedly every time it launch.* *it didn't crash on Apple website at teh first time after the updating, then now i
-
Hi Have lost my Install DVD for macbook pro and need it because my computer black out all the time - can I use the one from my husbands macbook (not pro) or how do I get a new one???
-
Lost Pictures, Help!!
I cannot find any pictures after May 2012 on my external hard drive even though I did a COMPLETE back up in Feb. 2013. Where can I find my pictures on the external hard drive? I went to Users > "MaW1028" > Pictures > Right Click on Iphoto to show pac
-
HT4859 itunes backed up my music and emptied my itouch
itunes backed up my music and emptied my itouch, what do I do?
-
The issue is we are trying to group 30-50 deliveries into a wave and then trying to create transfer orders through 2 step picking, but during the first step picking a couple of transfer orders do not get created due to various issues like bin block,