How can I parse the XML file using the Oracle's Sql query.

Hi all
I have an XML file that must analyze and display the result according to the following example
Can you please recommend me an approach to get the result.

For example, here is my XML:

<? XML version = "1.0" encoding = "UTF-8"? >
< xmlns:pi = "urn:com.workday / picof pi: Extract_Employees" >
< IP: employee >
< Additional_Information: pi > < pi: pi function: PriorValue = "" > Intern - masteri¿½s < / pi: function >
< / pi: Additional_Information >
< / pi: employee >
< / pi: Extract_Employees >

Databases:

Oracle Database 10 g Enterprise Edition release 10.2.0.3.0 - production

SQL > SELECT * FROM NLS_DATABASE_PARAMETERS;

NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS.,.
WE8ISO8859P1 NLS_CHARACTERSET
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI. SSXFF AM
NLS_TIMESTAMP_FORMAT-DD-MON-RR HH.MI. SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI. SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI. SSXFF AM TZR
NLS_DUAL_CURRENCY $
BINARY NLS_COMP
NLS_LENGTH_SEMANTICS BYTES
NLS_NCHAR_CONV_EXCP FAKE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.3.0



The Xml file above with UTF-8 character sets which is multi bytes.

But in my character database is WE8ISO8859P1 for example ISO-8859-1 (single-byte character set)

SQL > SELECT extractValue (Value (x) ', ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof ' ')
TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))


which gives the following error:

Error:
ORA-31011: XML parsing failed
ORA-19202: an error has occurred in the processing of XML
LPX-00200: could not convert from UTF-8 encoding to ISO-8859-1
Error on line 1
ORA-06512: at "SYS." XMLTYPE", line 295
ORA-06512: at line 1

Also I tried with this
SQL > SELECT convert (extractValue (Value (x), ' / pi:Employee/pi:Additional_Information/pi:Job_Title','xmlns:pi="urn:com.workday/picof"'),'WE8ISO8859P1 ', 'UTF8'))
TABLE (XMLSequence (extract (XMLType (bfilename('XMLDIR','XML_Issue_227176.xml'), nls_charset_id ('AL32UTF8')),'/ pi: Employee ',' xmlns:pi="urn:com.workday/picof"'))) x;)))

The same error is according to the above error message.

Please help in this regard.

Thank you and best regards,
Sandrine

You know the code of real character behind "" or you receive the file like that?

For the record, "" is the wildcard of UTF-8 (0xEFBFBD), so that the original character of the means has already been replaced and that very probably the file was not coded properly in the first place.

With respect to the resolution of the problem, try another method to read the file:

SQL> select value from nls_database_parameters where parameter = 'NLS_CHARACTERSET';

VALUE
----------------------------------------
WE8ISO8859P15

SQL> SELECT x.*
  2  FROM XMLTable(
  3         XMLNamespaces(default 'urn:com.workday/picof')
  4       , '/Extract_Employees/Employee'
  5         passing xmltype(
  6                   dbms_xslprocessor.read2clob(
  7                     'COP_DIR'
  8                   , 'XML_Issue_227176.xml'
  9                   , nls_charset_id('AL32UTF8')
 10                   )
 11                 )
 12         columns job_title varchar2(30) path 'Additional_Information/Job_Title'
 13       ) x
 14  ;

JOB_TITLE
------------------------------
Intern -  Master¿s
 

Tags: Database

Similar Questions

  • How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    How can I dynamically load swc files using as3? (without relying on the Flash IDE).

    The SWF file can be used in the same way as the CFC, which means that you don't need to "visually show" anything when it is loaded. Your code can use the classes and assets incorporated into the SWF, just as a SWC file. So if someone just to load the SWF file to see what was in it that they see nothing. They could however access programmatically to what anyone on the inside just like you, if they went to that level. But it is not as easy as just racing as SWF to see what is inside.

    I hope that all packaging several separate sovereigns will allow you to load and unload only what you need to keep the RAM usage as low as possible with a minimum load SWF.

    If you are ready, please mark all useful/correct so we can filter without response. You're welcome and good luck!

  • How can I change the text by default "Query by Example".

    Studio Edition Version 11.1.1.3.0

    How can I change the default text * "Query by example" * in a Collection of panels
    THX

    Hi thieto,

    The label you're looking for is af_panelCollection.LABEL_MENUITEM_QBE*.

    I'm writing a blogpost on this issue. In short, you need to create a group of resources of the skin.
    In the definition of appearance, refer to this class of the bundle.

    
    
      
        mySkin.desktop
        MySkin
        blafplus-rich.desktop
        org.apache.myfaces.trinidad.desktop
        skins/MySkin.css
        com.blogspot.lucbors.view.bundles.MySkinBundle 
      
     
    

    In this class, adjust the text of the label for your needs.

    package com.blogspot.lucbors.view.bundles;
    
    import java.util.ListResourceBundle;
    
    public class MySkinBundle extends ListResourceBundle {
      public MySkinBundle() {
        super();
      }
     @Override
      public Object[][] getContents() {
        return _CONTENTS;
      }
    
     static private final Object[][] _CONTENTS = {
         {"af_panelCollection.LABEL_MENUITEM_QBE","the text that you want"}
    
       };
    }
    

    More in the blogpost
    Good luck

    Luc Bors

    Published by: lucbors on July 26, 2010 11:39 (finished blogpost - added URL)

  • How can I lock the Oracle software owner account?

    Hello

    After the installation of Oracle on a linux/unix machine, how can I lock the account Oracle software owner?

    If the account is locked out, it affects the stop/start/operation of oracle process?

    Thanks in advance,
    Hozy

    That depends on how it is implemented in your operating system.

    For example, on my Linux operating system "oracle of L - usermod ' locks 'oracle' password to make a connection 'oracle' cannot be attempted. (Of course, this does not prevent the super user 'root' to run a ' su - oracle ' to login as 'oracle').

  • I have Acrobat 9 Standard at work.  How can I edit a PDF file using this?

    Part of my job is to create a PDF from web pages and then by removing non-essential materials.  But, I have Acrobat 9 Standard.  How can I do this with what I have?

    You can use the text editing tool to remove things. Alternatively, you can redact elements. Do not reflow to work, Acrobat isn't a real editor, but it's simple editing tools to fix simple rises. I would say download HTML source and installation which - appears as a much simpler process. If someone (like a boss) insists that use Acrobat and get a PDF file, then I recommend that you download the HTML editing and then create a PDF file from this edited version. Probably much faster, it can be to learn HTML. Many tools such as in SeaMonkey HTML editor and other tools of the Editor (DreamWeaver is usually recommended) can be used.

  • How can I change the oracle data to a dedicated server to another

    Hello

    A serious problem that has happened to our server and recommended webhost to reload the OS. How can I move data to the new server

    Best regards

    Christy H. wrote:

    > you must back up all the files of data as well as the control file and the spfile.

    I see a folder oradata/XE/*.dbf files. Do you want to say that the files?

    Please indicate where I can find spfile?

    Best regards

    From sqlplus / as sysdba enter:

    view the spfile parameter

  • How can I get the reasult like SQL

    The SQL code:
    SELECT ABAN8, ABAC01, A.AC01DSC, ABAC02, B.AC02DSC, ABAC03, C.AC03DSC, ABAC04, D.AC04DSC, DRSY, MOVING IN THE PRODDTA. F0101
    LEFT JOIN (SELECT DRSY, DRRT, DRKY, DRDL01 AS AC01DSC FROM PRODCTL. F0005 WHERE DRSY = '01' AND '01' = DRRT) ON TRIM (ABAC01) A = TRIM (A.DRKY)
    LEFT JOIN (SELECT DRSY, DRRT, DRKY, DRDL01 AS AC02DSC FROM PRODCTL. F0005 WHERE DRSY = '01' AND DRRT = '02') ON TRIM (ABAC02) B = TRIM (B.DRKY)
    WHERE ABAN8 = '20000 '.

    1.I import two tables F0101 and F0005
    2.i creat the joint complex physical schema:
    TRIM (BOTH 'PRODDTA. F03012 ". AIAC01) = TRIM (BOTH 'PRODCTL. F0005. DRKY)

    OR

    TRIM (BOTH 'PRODDTA. F03012 ". AIAC02) = TRIM (BOTH 'PRODCTL. F0005. DRKY)
    3.I creat the comlex participate full diagram
    4.I creat two Soursces
    The first is for AC01
    Second, one is fo AC02
    5. in the responses, I can't get the reasult.
    How to do? Please help me!
    Thank you very much.

    1. create a separate query to SELECT DRSY, DRRT, DRKY, DRDL01 AS AC01DSC FROM PRODCTL. F0005 WHERE DRSY = '01' AND DRRT = '01'
    2 create a query seprate for SELECT DRSY, DRRT, DRKY, DRDL01 AS AC02DSC FROM PRODCTL. F0005 WHERE DRSY = '01' AND DRRT = '02'
    3. Insert a query and drag the PRODDTA table. F0101 in the catalog, select the top of the query results. now join a left outer join on two results with the main request.
    4. use the filter and create a where condition. run u should get the desired result.

  • How can I solve the RDP and SQL problems after cloning of a paralytic?

    I got a job Server 2008 R2 system running SQL Server Enterprise 2012 all on an 8 G/4CPU VM and did a ' copy to ' VAPP Cloner.

    The new VAPP has been on one VLAN separated. During the copy process, customizing of comments was shortlisted, and I gave the new virtual machine, a new name for the machine. I can access both VLAN via my WIndows 7 x 64 desktop client OpenVPN.

    So far so good, I could use the vDC to log on the new machine of vApp using my previous administrator credentials.

    I found myself with two problems though...

    (1) none of my previous connections will work with SQL Server, when I try to launch SQL Server Management Studio. I get a message saying "Connection failed for user 'newmachine\user'" so maybe the MSN usr for duplicate users are not the same as the original sid user? I think that he could not tell the difference, if everything has been cloned and the machine name has changed.

    (2) my RDP 7 Windows client does not connect unless I have configure the new server to allow "a MOP" instead of just "Network Level Authentication" that has been configured on the original server that I cloned from. When I activate "all RDP" I can RDP into the cloned fine system.

    The cloned machine had the new name of the machine and a new SID assigned by the cloning process. The original and clone are on VLAN isolated and cannot see. Both not use areas and working groups.

    If I leave the cloned server THAT RDP "NLA" value only as the original server, my Windows 7 client gets a message complaining that RDP does not support the NLA for the cloned machine. RDP works fine connecting to the original server that still has not specified NLA. The RDP instance that says I need enabled NLA, watch NLA is activated in the about box.

    Someone at - he saw either of these issues? Any suggestions?

    Thanks, Dave

    Hi, my understanding is that sysprep does much more than simply by changing the SID of the box, it will also use the SID to regenerate the local MSN accounts system which is problably the origin of the problem, you're experiency. This is done for the security reasosns avoid guests who have accounts with the same sid on different machines. There is a tool called newsid that changes the SID of the server and let the system SID accounts because they were, but it has been known to have other issues but allow him to achieve what you want? I thiknk MS have retired it now, but you can always download on the net.

    If you need get SQL running sysprep and want to automate the process to set up your DB and users following post useful:

    http://msdn.Microsoft.com/en-us/library/ee210754.aspx

  • How can I change the oracle schema in SSMA?

    We tested migration in SSMA for Oracle to SQL Server, and we are now ready to migrate from the production data.  However, the SSMA tool doesn't let me change the Oracle schema.  I can change the data source, but it will never refresh show new patterns in Oracle.

    Hello

    Please go to the Microsoft Community Forums.
     
    This problem would be better suited to the TechNet community.
    Please visit the link below to find a community that will provide the support you want.
     
    Thank you.
  • How can I send a PDF file using Adobe Reader IX and have use HTML instead of plain text in Outlook

    Hey guys

    New to the Adobe Forums. So hey... :))

    That's the problem I have


    I use Outlook 2007 to my e-mail client, Adobe Reader XI has been implemented already so that it uses Outlook to send from Adobe

    Whenever I send a new email or respond to an email in Outlook, it uses HTML. It is very good

    However, when I click on Adobe XI e-mail button. It opens a new e-mail message in Outlook with the attachment already fixed, but it does not use the HTML, I have no signature, its plain text all.

    Is there a way I can fix it.

    See you soon

    NATO

    As far as I KNOW, no. Acrobat/Reader will generate emails in plain text.

  • How can I get the logic of sql from the catalog or the obiee Manager

    I try to get the logic sql behind a report. Can someone help me how to get sql obiee presentation services or from Catalog Manager

    Hello

    Addition to the response of Srini, you know that there is a new view in g 11 responses to display SQL logic? Just choose in the analysis-> results-> new view-> other-> SQL-> Standard SQL logic views.

    I hope this helps.

    Diakité

  • How can I configure the Oracle environment for an app of the OCCI crontab?

    I have a set of OCCI apps that I run from crontab on RHEL 5.2.
    Get the environment properly configured Oracle (the way shared lib for example) is proving to be a challenge
    like crontab ignores .bashrc and .bash_profile.
    Anyone got any smart suggestions on how best to do it on RHEL?
    Thank you

    Having the OCCI app run in a shell script. The shell script can define all necessary environment variables and then can call the OCCI app.
    for example. (Bourne shell script, say app1.sh)
    ORACLE_HOME =...
    LD_LIBRARY_PATH =...
    PATH =...
    ORACLE_SID =...
    TWO_TASK =...
    TNS_ADMIN =...
    Export ORACLE_HOME LD_LIBRARY_PATH PATH TWO_TASK TNS_ADMIN
    myocciapp

    chmod + x app1.sh
    Make sure that app1.sh works fine without setting the environment variables to the outside.
    Make an entry in the crontab to run app1.sh

  • How can I disable the auto-hide known file attachments, and why are still on the 10 internet pages where I have to download something if I use firefo

    How can I disable the auto-hide known file attachments and why are they always about 10 Web pages where I have to download something when I use mozila firefox?

    Windows computer

    Ignore the link of the player Shockwave that probably, you mustn't he compared to Flash player because it is barely used nowadays.

    FredMcD, you really need correct/update your clipboard for that.

    The downloadable Shockwave player version (not flashing) is 12.1.3.153 and not 15.0.0.152 as you can be confusing which version of the flashplayer reached before.

    Flash player is 15.0.0.189 and not 14.0.0.179 as you can see at https://www.adobe.com/software/flash/about/

    Flash player is used for good Flash videos like Youtube and Flash games in Shockwave player is little used compared to Flash, for things such as games and online learning tools.

    And please, don't say "I asked. It's the way it is displayed on the site"as you said last time in https://support.mozilla.org/en-US/questions/1026518 , because who says little about why you're wrong ad versions and calling Shockwave player, Shockwave Flash.

  • I use to manage my DSL modem via an ip address. When I enter FF8 I wonder where to save the file. Why and how can I prevent the FF8 to do this?

    I use to manage my DSL modem via an ip address. When I enter FF8 I wonder where to save the file. Why and how can I prevent the FF8 to do this?

    And now, whenever I'm in an ip address that I wonder if I want to download the file.

    This happens when the modem server does not send the file in text/html, but with a different MIME type.

    I tried adding index.html in the event that the server can send this file as text/html.

    If your DSL modem has a support Web site, then you can try asking it there advice on how to configure the server modem.

  • How can I display the time of the data stored in a file using labview?

    How can I display the time of the data stored in a file using labview?

    Hi Matt,

    I think that we will need a little more information as to how you capture the data, what data you capture, etc.

    If you capture a waveform, is to extract the time data waveform which includes the t0 and dt values, so you can understand the time stamp of a specific data point as in the image below.

Maybe you are looking for

  • Can I watch tv on my apple ipad and it's free, if so how?

    my daughter bought me an apple ipad, I would like to know if I can watch TV on this subject and it is free? also how do I'm a PAO and disabled, so any help would be grateful.

  • Problems with the MSXML6 Service Pack

    You try to download an accounting program and receipt following in the accounting program error... Program could not download SQL Server 2005 Express, we should try to manually download from Microsoft. Tried and received the message that we didn't ne

  • Factory reset on laptop Windows 8.

    My laptop is an Acer V3-571 with windows 8, it would not download Windows updates so I decided to do a factory reset via Acer Recovery Management.I started 3 hours ago and it is only 38%. Is it normal to take as long as that?

  • Connect additional router HELP HELP NOVICES

    Dear Sir. I use the WAG320N to connect my PC to the ADSL in the wall for the internet.  This router on a recesses 2.4 or 5 ghz channel so I put it to 2, 4 GHz because most of my hardware doesn't support it. I now Lee a media server which need 5 GHz c

  • WRT350N blocking up

    I bought a Linksys certified WRT350Ns renovated an update of my WRT54G v6. I probably would have been satisfied with my 54G since it is running solid as a rock now. Anyway, the ngn350 happened to me DOA. It was walled with just a blinking light. So I