Which way to go with PL/SQL and XML

Hi fellows,
I have a general question to XML on Oracle.
I read already some parts of the three manuals coming with the online documentation of 9i
- XML developer kit XDK
- XML API - XDK and Oracle XML DB
- XML database developer guide Oracle XML DB.
Also I wrote already a PL/SQL package using DBMS_XMLGEN to generate XML data from relational Oracle tables.
Actually I like the simplicity how I can create XML data with this DBMS package but I still missing the features like using a DTD/XML Schema to generate XML data.
I still don't know what the best way would be to use these features of XML in Oracle.
Hopefully someone can give me some advise and possibly can point to some code samples so that I can see the proper use of the package.
How about DBMS_XMLQuery?
To use this package, would that be the better solution for my problem?
Any comment much appreciated.
Thanks
Fred

Hi Fred,
Having written a fair amount of PL/SQL code to generate and process XML in the past years, I can give you my opinion on the matter. If you look at the PL/SQL API's Oracle has been written to handle XML, you will find two types/categories of API's: PL/SQL code based on wrapping java (i.e. DBMS_XMLQUERY) and PL/SQL code based on C (i.e. DBMS_XMLGEN). The first category is usually slower, so I tend to use these only if there are no other options. You can measure execution times by executing the same query using both DBMS_XMLGEN. vs. DBMS_XMLQUERY.
I usually tend to store xml into relational tables by extracting the xml document in PL/SQL using the functions XMLType data type offers (i.e. extract, existNode, getStringVal, etc) function rather than using DBMS_XMLSTORE for flexibility reason (more control over what's being stored).
Besides the PL/SQL API's there are some rather neat SQL functions to handle XML (i.e. XMLElement, XMLForest, XMLAgg, XMLAttribute, etc) I like to use to build XML documents that are to complex for DBMS_XMLGEN. But, on the downside, I think these functions might cost considerable amounts of CPU, because behind the scene a DOM-tree is build in the SGA/UGA(?), especially on large XML structures or high concurrency systems. I have not measured this yet, so I say might.
Further, what I think is lacking from the Oracle API's in general is handing of CDATA sections and the fact that some XML functions default generate "pretty-printing" XML, which can not be switched of as far as I know. In my opinion XML should never be "pretty printed", because XML basically is about data transportation, not about lay-out. CDATA sections are not handled, even worse "<![CDATA[ ]]>" is being escaped (to &lt and &gt) and not properly interpreted when processed back to text.

Similar Messages

  • I have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    i have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    You need to get headset splitter adapter.
    http://www.startech.com/Cables/Audio-Video/Audio-Cables/35mm-4-Position-to-2x-3- Position-35mm-Headset-Splitter-Adapter-Male-to-Female~MUYHSMFF

  • New hard drive installed in Mac.  iTunes keeps asking to authorize a very old email address which is not associated with my iPhone and I cannot sync iTunes to my iPhone.

    New hard drive installed in Mac.  iTunes keeps asking to authorize a very old email address which is not associated with my iPhone and I cannot sync iTunes to my iPhone.

    It is referring to purchases made using an Apple ID that was set with that email as the Apple ID. Did you simply create a new Apple ID when the old email address was no longer being used? If so, then that old Apple ID is still tied (and will always be tied) to the purchases made with it, and you will have to sign into iTunes with that Apple ID in order to authorize the computer to it.
    If you don't remember the password for it, you can go to Manage your Apple ID and click on Reset password. If you don't remember the answers to your Security Questions, you can contact Apple Support to get them reset:
    ACCOUNT SECURITY CONTACT NUMBERS
    Cheers,
    GB

  • Can I mount my external hard drive which will be compatible with both Mac and Windows?

    Hello,
    Can I mount my external hard drive which will be compatible with both Mac and Windows? If yes, then please let me know, because I intend to use my hard drive for both Windows and Mac, without losing any file.

    Yes. By default, Mac OS X and Windows can read and write drives which are formatted as FAT32 or exFAT; NTFS drives aren't writable from Mac OS X without additional software.
    (124553)

  • XDK for PL/SQL and XML Parser for PL/SQL

    Is there a difference between the terms:
    XDK for PL/SQL
    and
    XML Parser for PL/SQL V2
    or are they the same thing...?
    cheers,

    XDK stands for XML Developer's Kit. There are Oracle XDKs for Java, C, C++, and PL/SQL. These development kits contain building blocks for reading, manipulating, transforming, and viewing XML documents.
    XML Parser is one component of XDK. Other components of XDK are
    XSLT Processor, XSU, XSQL Servlet, XML Class Generator, etc.
    For more information on XDK and its components please refer to:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96621/adx01bas.htm#1656
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • Can I edit with Smart Print the same way I could with Smartweb Printing and then save as PDF files.

    With Vista basic and SmartWeb Printing you had the option to edit your pages and then to save or print them in the PDF format. This way you could customise various pages pages, save them to a file and then reopen the whole file to see if you wanted to make any further changes before printing the final copy.
    sharjor

    Steve M. wrote:
    I installed the full suite of Canon printing, scanning, faxing and whatever else software they provide for this all-in-one.
    Maybe you don't need that. I prefer using Apple's Image Capture for scanning.
    Right now I am working on scanning documents into PDFs. The Canon software lets me create multipage PDFs which is something I've been wanting to do. My question is, is it best to scan images as JPEGs and then save them as a multipage PDF or is it best to scan into PDF directly (which the scanner seems to offer as well) and then save as a multipage PDF? I'm thinking in terms of the best optimization of file size vs. image quality and things like that.
    Let the software do it for you. That will be fewer steps for you. Image-based PDFs are going to be large. There is no way around that. If they are too large, you can use Preview's Save As feature and play around with the Quartz Filter.
    Is the scanner actually doing anything differently when scanning into JPEG vs. PDF? Or is the scanning all the same and it's just the saving of the file that is different?
    Scans are scans. The JPEG file format is lossly and will look worse than other types. If you are scanning in photographs, the JPEGs will look good. If you are scanning in crisp text, JPEGS will have lots of artifacts and look bad.
    In general what dpi setting is usually sufficient to use to scan a basic text document without taking up too much file space?
    I pretty much always keep it at 300 unless I need something special or when the original is really small and I intend to blow it up.

  • How do I add an ipad to my itunes account which was previously associated with another account and user?

    how do I add an ipad to devices in my itunes account which was previously associated with another account?

    Just sign into your own ID in Settings>iTunes & App Store. Sign out of the old ID and sign into your ID. I get the feeling though, that there is more to what you are trying to do or want to do and I'm not understanding or you are not explaining completely.
    If this is a previously owned iPad, it should have been erased before you got possession of it.

  • Which iMac for use with Photoshop CS5 and Lightroom

    Any opinions on which iMac is best for use with Photoshop CS5 and Lightroom. Not sure if the 2.7 i5 with 512 graphics card is Plenty of power or if upgrading to the 3.1 i5 or 3.4 i7 is a wiser choice given the price differences. Appreciate the help

    So I was reading over your post, and even though this is older and has to do with CS5, I have some information for CS6 that will be relevant to your question now that it is time to upgade the software. In general Photoshop has always been more about RAM than Processing power, though that is important too. Until CS5 it could never quite take advantage of what multi-core processors really had to offer, and even the graphics card didn't really effect much of it outside of certain features and the 3D optio
    Now that is no longer true and Adobe can effeciently use all aspects of the computer to give you much better performance.
    So much so that I was able to buy a brand New ASUS with the following specs:
    Dual Core 2.2GHz Processors
    8GB of RAM (4GB original to the machine)
    Windows 7 Home Premium 64Bit OS
    320GB HDD w/ 5400RPM
    This machine not only runs photoshop CS6 and Launches in less than 5 Seconds... it can run Premier and After Effects as well, and this Laptop cost me less than $400 (on sale at Best Buy 2 Weeks Ago. You don't have to buy something this cheap, but isn't it great that you can and still run Master Collection effectively?
    You can read my details on how to buy a Photoshop CS6 Laptop, what specs you need, comparison between Mac and PC and watch the video of my Photoshop Speed Test by reading this article:
    http://robertoblake.com/blog/2012/06/buying-a-photoshop-cs6-laptop

  • CRM 5.0 Installation with MS-SQL and windows 2003 server

    Hi,
    I have to install CRM 5.0 with MS-SQL 2005 and ECC 6.0 with Oracle 10g and integrate with QAS(Third party tool).
    My question are:
    1.Can we install all there application on single server.
    2. what s/w units we have to chose generally and what are standard(ie. EP,TREX etc.....)
    3.Can we install the s/w units later after CRM core installation.
    I am a BASIS Consulatnt and first time installing the CRM.
    Regards
    Alok

    Hi Alok,
    1. You can install all the applications in one box, But it is not advisable as the performance of all the applications can degrade.
    2. Software units like EP, Trex are installed based on the business needs, requirements...
    3. You can proceed initially with the installation of CRM Core components and later you can install other components/ software units.
    Thanks
    Ashok. R

  • I need a new modem. Which modems work well with MacBook Pro and Airport Express?

    I need a new modem. Which modems work well with the MacBook Pro and Airport Express?

    You need to inquire from your ISP which modems are compatible with their netwrok. They should give you a list.

  • Using PL/Sql And XML

    Hello,
    Am trying to use the xml packages from pl-sql. Could someone please tell me what priviliges are required to use these package fully. I also guess that public synonyms should be set up.
    Tia.
    Rgds.
    Kim.

    I have checked that the XML parser is installed using the suggested select statement. It seems ok.
    Logging in as dba user, using Desc xmlparser is ok.
    Created user XmlTesting, granted the roles javauserpiv and javasyspriv to this user. Desc xmlparser give error sys.xmlparser does not exist.
    More thoughts appreciated.
    Tia
    Rgds.
    Kim.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by ilho Ye ([email protected]):
    You first need to install XML parser for java since XML parser for PL/SQL depends on it.
    Try this SQL and see if Oracle XML parser is already installed on your machine.
    select substr(dbms_java.longname(object_name), 1, 30) AS class, status
    from all_objects
    where object_type = 'JAVA CLASS'
    and object_name = 'dbms_java.shortname('oracle/xml/parser/v2/DOMParser');
    If you see the result that status is valid and class is 'oracle/xml/parser/v2/DOMParser.
    Then you are good to go.
    secondly try this after connecting sqlplus
    describe xmlparser
    If you do not get anything, then you need to install XML parser for PL/SQL.
    You can download it in which there is a readme that would help you to install from technet.
    Also make sure that you grant javauserpriv and javasyspriv privilege to the one who is going to execute XML.
    When you finish up installing all this, try the command, describe xmlparser again.
    If you now see the result, you are all set.
    From now on you can run PL/SQL to access and retrieve XML.
    Hope this helps !!! <HR></BLOCKQUOTE>
    null

  • SQL and XML Schema

    I hope this is the right forum to post. I was wondering if there are any good tutorials or books on SQL to XML?
    Basically I need to query accounts in the state of North Carolina that have recieved a certain document in the past day. That is a very easy task to do in SQL however the state of NC wants us to report our findings in a specific XML schema using nodes.
    Luckily I have the schema which was given by the state of NC however not sure how to get my query to fit into the XML schema. Just wondering from a beginners perspective.
    Sorry for the newbie questions.

    The [XML DB Forum|http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0] is a good place to start.

  • PL/SQL and XML

    Hello to everybody.
    First of all, sorry for my english.
    I have to make a PL, where in someplace I have a varchar with this content:
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><HelloWorldResponse xmlns="http://prueba/LlamadaPLWS"><HelloWorldResult>prueba</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>
    Any idea of how can a get the content of the 'HelloWorldResult' tag inside the PL???
    In this case it would be 'prueba'.
    As you can imagine, I´m a novice in this area.
    Thanks a lot in advance.

    SQL> with t as (select xmltype('<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/env
    elope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><HelloWorldRes
    ponse xmlns="http://prueba/LlamadaPLWS"><HelloWorldResult>prueba</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>
    ') as myxml from dual)
      2  -- END OF TEST DATA
      3  select extract(myxml, '//HelloWorldResult/text()', 'xmlns="http://prueba/LlamadaPLWS"').GetClobVal()
      4  from t
      5  /
    EXTRACT(MYXML,'//HELLOWORLDRESULT/TEXT()','XMLNS="HTTP://PRUEBA/LLAMADAPLWS"').G
    prueba
    SQL>

  • I downloaded Mozilla 4 and tried to use it then, I had to delete it and go back to 3.6 vs now I am having problems with my MS SQL 2005 why? What was changed to enable Mozilla 4 to sync with MS SQL and how do I get it corrected?

    After, trying Mozilla 4 beta and then having to go back to a previous vs of Mozilla 3.6.11 my MS OLE DB Provider for SQL 2005 Server has this error message '80040E57' I am using Windows 7 which was pre-installed on my new computer. I do not know how to fix it?

    The latest flash player release is 11,0,1,152.
    Can you upgrade to this version and see whether the crash stil exists?
    Go to get.adobe.com/flashplayer to download and install flash player.
    In case you need direct link to installer/uninstaller, please go to http://forums.adobe.com/message/3952360#3952360 to find them.
    saranlee wrote:
    My computer crashes repeatedly and I get the message pages are not responding do you want to stop, and/or shockwave is not responding do you want to stop. I have Windows XP Service Pack 3, I am having the same issues whether I use Internet Explorer, Google Chrome, or Mozilla Firefox. My HP Pavilion Desktop has 504 MB of Ram and I am using high speed internet connection. Because it was crashing so much, I used the uninstall program for Flash player to uninstall Flash, I checked my registry and removed anything I saw that was Flash. I then uninstalled Google Chrome and Mozilla Firefox, then I reinstalled the most recent versions from their websites. I did the same for FlashPlayer and Shockwave Flash. I went to the Adobe website and had them check to see if it was working and it shows I have FlashPlayer 10.3.181.36. The page that shows  which version of flash player goes with Windows XP states that I should have 10.3.181.34 (This is what I thought I had before I updated, I was having the same problems). When I went into my computer to see what version I have, it shows 11.5.9.620 Activex and both Flash Player and Flash Player Object is listed as 10.3.181.34. My firewall for Windows is set to medium. I also am running Norton Internet Security. It takes anywhere from 3-6minutes for some of my games to load, and I have to refresh at least 3-4 times in order to play. When I do start to play it freezes frequently and I use escape to free it up. This has been going on for a month. I have no idea what to do. I am not very computer savy and I have been learning as I go.

  • Calling a REST webservice with pl/sql and parse XML

    Hi
    I hope someone is able to help me with this task. I'm newbie with Oracle APEX, have not developed advanced applications yet. A few days ago I installed one of the package application with customer and order. I want to integrate with online shopping with Rest service using PL / SQL. NETS is a provider of online payment systems.
    http://www.betalingsterminal.no/Netthandel-forside/Teknisk-veiledning/Communication/REST/
    There are four steps you must go through to execute the payment. where it is retunert xml files containing infomation to be used further.
    Step 1 - Register payment
    Webshop Performs Register:
    https://epayment-test.bbs.no/Netaxept/Register.aspx?MerchantId=9999997&token=secret&orderNumber=10011&amount=200&CurrencyCode=NOK
    &redirectUrl=http://webshop/RegisterReply.asp
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <RegisterResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    </ Register Response>
    Step 2 - Present Web form to customer
    Webshop's customer submit web form:
    https://epayment-test.bbs.no/Terminal/default.aspx?merchantId=9999997&transactionId=b127f98b77f741fca6bb49981ee6e846
    Step 3 - "Redirect" customer back to merchant
    Payment provider send URL to redirect webshop's customer:
    http://webshop/RegisterReply.asp?transactionId=b127f98b77f741fca6bb49981ee6e846&responseCode=OK
    Step 4 - Process payment
    Webshop Performs Process (AUTH):
    https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846&operation=AUTH
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <Process Response xmlns: XSi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema">
    <Operation> AUTH </ Operation>
    <ResponseCode> OK </ Response Code>
    <AuthorizationId> 064392 </ AuthorizationId>
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    <ExecutionTime> 2009-12-16T11: 17:54.633125 +01:00 </ ExecutionTime>
    <MerchantId> 9999997 </ MerchantId>
    </ Process Response>
    Webshop Performs Process (CAPTURE)
    https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846
    &transactionAmount=200&operation=CAPTURE
    Reply from payment provider:
    <? Xml version = "1.0"?>
    <ProcessResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Operation> CAPTURE </ Operation>
    <ResponseCode> OK </ Response Code>
    <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
    <ExecutionTime> 2009-12-16T11: 40:57.601875 +01:00 </ ExecutionTime>
    <MerchantId> 9999997 </ MerchantId>
    </ Process Response>
    I really appreciate if anyone can help me with This

    Hi,
    Is there any particular reason you want to call a form through provider API?
    Because when you call a from through
    wwa_api_provider.show_portlet the issue #1 is true (you cannot pass parameteres to a form) and the issue #2 could be resoled by supplying a porltet_record.p_page_url to the current page URL.
    However, there is a form-specific PLSQL APIs to call a form and pass parameters to that from which is describe in our FAQ list:
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    Please see following topics:
    "How do I call a form in insert mode and pass it default values?"
    and
    "How do I call a form and pass it a query condition to be automatically executed?"
    Thanks,
    Dmitry

Maybe you are looking for