Writing a Procedure to return back XML. Please help.

Hello,
I am writing a procedure in Oracle 10G,that will return back an XML
to me.
I am passing 2 parameters to this procedure (a Quantity and a Price) and these parameters are element values of the XML that will be returned.
My Query is :
1) How can the arguments being passed to the procedure become element values.
2) Is my procedure to return back the XML correct.? Please can someone modify this procedure?
Please can someone help me with this procedure as this is a PROD issue.
Help really appreciated.
PROCEDURE getTradeXML(qty IN VARCHAR2,price IN VARCHAR2 xml IN OUT CLOB)
IS
xml CLOB;
BEGIN
xml  = 'SELECT XMLELEMENT("Trade", XMLELEMENT("Quantity",qty),
                                    XMLELEMENT("Price", price))
          FROM DUAL'
END;

PROCEDURE getTradeXML(qty IN VARCHAR2,price IN
VARCHAR2 xml IN OUT CLOB)
IS
xml CLOB;
BEGIN
xml  = 'SELECT XMLELEMENT("Trade",
XMLELEMENT("Quantity",qty),
MLELEMENT("Price", price))
FROM DUAL'maybe you want
SELECT XMLELEMENT("Trade", XMLELEMENT("Quantity",qty), XMLELEMENT("Price", price)) into xml FROM DUAL;
/*not tested*/

Similar Messages

  • New line character and carriage return in XML, please help, thanks

    In XML, "
" is only the new line character. I have tried that. If you put that in your XML, for example:
    <tag>line1&#10;line2&#10;line3</tag>
    You will get the output as follow:
    line1
    ____line2
    ________line3
    (where ___ represents space)
    The output that I want is actually like:
    line1
    line2
    line3
    So I would like to ask how I can do this.
    Thanks,
    Jackie

    while parsing your XML file you can directly suppress these newline and similar things in characters() method of SAX parser.
    you can opt to do nothing when you encounter them else if it is normal character then use it to print it.

  • My ebay toolbar and the ebay logo that was in my system tray at the bottom have both disappeared when I installed FireFox??? How do I get them back? Please help.

    my ebay toolbar and the ebay logo that was in my system tray at the bottom have both disappeared when I installed FireFox??? How do I get them back? Please help.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 
    Regards
    TD 

  • I accidentally synced my mum's brand new iPad to my mac book air. A few days later I realised that my iTune library on my mac is completely gone. So is my iPhone 4s after I synced it with my mac. How do I get my old iTunes library back? Please help!

    I accidentally synced my mum's brand new iPad to my mac book air. A few days later I realised that my iTune library on my mac is completely gone. So is my iPhone 4s after I synced it with my mac. How do I get my old iTunes library back? I tried using icloud on my iphone but it stated that I have never back up my phone before. So I guess my iCloud data is gone too? But I have back up my mac in my harddrive using time machine. So how do I get my old itune library back? Please help! Thanks!

    1) ensure iTunes is authorized for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPhone but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPhone with it.
    above works for purchases from the iTunes store. for everything else, check out this post by Zevoneer.

  • I down loaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you

    I downloaded about 100 cds to my library and I can no longer view the downloaded artwork it's shows a black picture or blank. How can I get the artwork back? Please help! Thank you.

    Hi- apparently I also had a similar moment of madness and thought that 'freeride games' would be fun. Well, so much for that! It added a ton of things to my tool bar, I would like to uninstall it, any suggestions for this one?
    thanks :)

  • I updated my ipod on my computer to the ios 5 and it updated but all of the music, movies, and apps were cleared off. I cannot put any of it back on please help! :(

    I updated my ipod on my computer to the ios 5.1.1 and it updated but all of the music, movies, and apps were cleared off. I cannot put any of it back on please help!

    Go to iTunea>Preferences>Devices and see if there is a backupright at the time you did the update. Then try restoring from that backup. If the apps are in your iTunes library, any app data will be restored to the iPod.
    When restoring from an iOS 4 (or later) backup, if the device had a passcode set, iTunes will ask if you want to set a passcode (and remind you that you had protected your device with a passcode). iTunes will not ask you to set a passcode when restoring from iOS 3.x and prior backups.
    Therefore, remembe the passcode that you enter this time.
    It appears that if you restore from a backup, that backup is not subseqyently overwritten by the next backup.

  • I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    I just bought a new iPhone and accidentally backed it up with my old iPhone backup, I do not want this. I lost everything on my new phone and I need it back. PLEASE HELP! This includes pictures and texts, etc.

    So just to be clear, when you say "just bought" how long ago was that? Is it on this new iPhone that you had pictures, texts, etc that you want? Were you backing up to iCloud or onto iTunes?
    This may not help for everything but if you go to iCloud.com and log in, are you able to find your pictures there?

  • I went to put music on my itunes from my ipod and it deleted most of my music off of it and i dont know how to get it back. PLEASE HELP ME. :-|

    i went to put music on my itunes from my ipod and it deleted most of my music off of it and i dont know how to get it back. PLEASE HELP ME. :-|     

    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes      
      - Restore to factory settings/new iOS device.                       
    If necessary, you can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • TS4605 Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Hi, I was working in WORD on a file containing huge data. My machine just hung up one day while working and now I seem to have lost the file how do I get it back.  Please HELP me.

    Well, iCloud has nothing to do with this.
    Do you have the built-in backup function Time Machine running on your Mac?
    See: http://support.apple.com/kb/ht1427

  • I am using windows 7 and itunes 11.7 my i phone 5s is not getting synced with my laptop it keeps showing backing up  please help i need to put music in my phone?

    i am using windows 7 and itunes 11.7 my i phone 5s is not getting synced with my laptop it keeps showing backing up  please help i need to put music ?

    Hi,
    Have you managed to solve this problem? if yes, please highlight how you solved it...i'm facing same problem with my new Iphone 5S but udner Windows, thanks.

  • I have QuickTime Player 7.6.8, I cannot update or remove it b/c I am missing QuickTime.msi file. It is gone and I need it back. Please help.

    I have QuickTime Player 7.6.8, I cannot update or remove it b/c I am missing QuickTime.msi file. It is gone and I need it back. Please help.

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any QuickTime entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • I just updated my iPod touch and all my pictures are gone!!! How do I get them back? Please help!!!

    I just updated my iPod touch 4th generation to iOS 6.0.1 and all my pictures are gone!!! Everything else is there but my pictures! How do I get them back? Please help!!!

    If the photos were i your iPod's Camera Roll album (taken by or saved to the iPod you can:
    - If your PhotoStream is on you can get the last 30 days worth back. See that topic here:
    iOS: Importing personal photos and videos from iOS devices to your computer
    - Or you can restore from backup if you backed up when the photos were on the iPod.
    If the photos were synced to the iPod then you have to get them from where you got them the first time.

  • Installed both 10.1.4 and 11.0.08 updates this week and now I can't use the Digital "Sign" document feature.  It's been completely removed.  Need it back. Please help..

    I installed both 10.1.4 and 11.0.08 updates this week and now I can't use the Digital "Sign" document feature.  It's been completely removed.  Need it back. Please help..  Can't sign or add text to any pdf document. Even when security properties allow it. 

    I would remove Reader and repair or reinstall Acrobat.
    Having different major versions can cause some users issues. Reader is not necessary if one has Acrobat installed. Even though Adobe has improved the capability of having both Reader and Acrobat with the same major version level there are still user configurations that have problems with this setup.

  • HT4623 after the new softtware 6.1 on my iphone i losed my picture , how can i get back ? please help me

    after the new softtware 6.1 on my iphone i losed my picture , how can i get back ? please help me

    Try deleing the download and try again. It is located:
    IPSW file location for Mac and Windows
    If yo restore, the iPod will also be update. You can try that. Just make sure that you backup first so yo can restore from backup
    iOS: How to back up

  • I've accidentally closed my program sequence at the top. And now I can't get it back. Please help

    I've accidentally closed my program sequence at the top. And now I can't get it back. Please help. All my source, timeline, sequences are blank...

    Go to the Media Panel and double click on the sequence.

Maybe you are looking for

  • I bought song on my iphone and they did not show up on my computer

    I bought music on my iphone and it did not transfer to my computer. Also the itunes on my computer will not let me purchase any music.

  • Itunes wont read iphone, thinks it's a digital camera...help

    I dont know what happened, but when I first got my PC with vista 64, and had itunes installed with the iphone, everything worked. 3 days ago I reformatted my drives and reinstall windows and all my programs. I got itunes working with all my music and

  • No longer able to boot - failure with /boot

    I recently, due to a hard drive change, rebuilt my desktop.  Every now and again, since then, it hasn't booted.  I just logged into root and rebooted; figuring I'd sort it out at some point. Only, now it won't boot at all.  When I go through journalc

  • Creation of a Delivery note  : VL10G

    Hi, i want to create a Delivery note in Tcode : VL10G from a PO. so i enter a PO number then i execute, but i have a table without items as result. Please how to solve that ? Regards

  • DBMS_LOB 22288 Command Length Incorrect Error

    I am trying to open a file (WIndows Server 2003) using DBMS_LOB and keep getting an error. The code is: CREATE OR REPLACE procedure LINECOST.btest is abfile bfile := bfilename('ROUTING', 'database.xml'); begin dbms_output.put_line(dbms_lob.getlength(