Extraction of data from the node

Hi all. Apologies if it's very basic, but a real beginner here!

I use 10g and trying to extract data in a XML_Type column for use in a stored procedure. The data I received looks a bit like this:
<TestRequest RequestName=”Test” TypeID=”1” RequestDate=”20091122093047” Status=”0”>
     <TestParameters>
          <TestParameter TPID=”4” TPName=”Test1”>Test1</TestParameter>
          <TestParameter TPID=”5” TPName=”Test2”>Test2</TestParameter>
     </TestParameters>
</TestRequest>
I'm interested in the value in the TestParamter where the TPID = '4 '.

By using the following query:
select extract (xml_data,'/TestRequest/TestParameters/TestParameter[@TPID="4"]') from table_name
I can get:
"< TPID TestParameter = '4' TPName ="Test1"" > Test1 < / TestParameter > ""

But all I want is the value of Test1. How to do this?

Thank you very much

How to do this?

Get it in this way:

SQL> with t as (
  2  select xmltype('
  3  
  4  Test1
  5  Test2
  6  
  7  ') xml_data from dual)
  8  select extractvalue(xml_data,'/TestRequest/TestParameters/TestParameter[@TPID="4"]/text()') from t;

EXTRACTVALUE(XML_DATA,'/TESTREQUEST/TESTPARAMETERS/TESTPARAMETER[@TPID="4"]/TEXT
--------------------------------------------------------------------------------
Test1

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

Tags: Database

Similar Questions

  • Getting data from the nodes of event data

    Hi all

    I have a while loop with a Structure of the event and a Structure of case inside. The Structure of the event a lot of cases, and each of them is controlled by a different object (buttons, sliders, graphics, etc.). Sometimes, I have to use data from the nodes of event data to power a Business Structure that works like a State Machine in my code. To clean the block diagram, I want to 'export' data nodes using a single wire event data, but this is not possible because there is a conflict of data, since I get data of CtlRef in one case and Coords in others (for example).

    To resolve this problem, I'm feeding a beam to create a cluster and feed it to the box Structure data. However, the process is so painful, because I have to feed the Bundle function with constants of all sorts of data connected to him.

    Find attached an example. It is not the actual code but shows what I have to do.

    Thank you

    Dan07

    Why you do not pass a Variant to the structure of the case. In your case case simply make a variant of the appropriate data that you want to pass. I guess the case appropriate business structure will be to get called for the event. Given that you need to know the data type this case awaits can use the variant data VI and now you have the data you want.

  • How to extract specific data from the user to view?

    Hello

    I have a requirement I need to display only the Session_user-specific data in the table. Scenario is that if the user belongs to a specific region should be able to see data for that specific region only.

    I think passing the session_user view query name but don't know if it of possible or not. If possible how to do this.

    What is the best way to achieve this?

    Thank you

    Angelica

    Hello

    If you use the ADF for authentication security, the user name is then accessible from the context of the ADF in British Colombia ADF. You can then

    1. create a view of the criteria in British Colombia ADF to a specific view

    2. set the display criteria to use a variable binding

    3. use groovy to add the value of the bind variable

    -set the type of value of 'Expression '.

    -Add adf.context.securityContext.userName

    4. go in the Module--> Application data model

    5 Select the instance of the View object

    6. press on "change."

    7. Select the view test

    If you download the example in this article: Oracle ADF: security for everyone so you see that users have a profile page containing data for the authenticated user. Sound by using the method described above

    If you do not use ADF security you can always use this approach. Instead of providing the value of the variable bind using Groovy you can run the view object using executeWithParams operation in this case, you can read the value of the authenticated user to the side view ADF. The binding variable would not be set to the Expression in this case though.

    Frank

  • Extraction of data from the xmlclob attribute

    Hi all

    I am trying to extract the value of the attribute below clob.

    kindly advice how to retrieve the value by using the xml functions.

    I use version 11.2.0 and toad 9 oracle database.

    I've highlighted the comment tag. the highlighted, I need to recover ' time changed according to the dtd VSG mail 25/01/2013 14:27.» SVK, & #xD; & #xA; Recipient added by mail from Richard dtd 20/02/2013 09:45. SVK" of the value attribute.

    Please suggest how to achieve using SQL. Data stored in xml format in the clob column.



    <? XML version = "1.0"? >

    " < ValuationRequest xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "container =" " http://www.w3.org/2001/XMLSchema "ValueID ="169821"Version ="2.6" "

    " xmlns =" http://XBank.FxVals/ProcessValuationRequest.xsd "Status ="AC"> "

    < ValueID '5' = ClientRelationShipType > < / ClientRelationShipType >

    < ValueID owner = '14539"Name ="JEREMY LEVINE"> < / owner >

    < ValueID customer = "6892067" Name = "XXXXXXXXXX, NEW YORK" > < / customer >

    < ValueID = "1" CMVRegion > < / CMVRegion >

    < ValueID = "1" ValuationTypeID > < / ValuationTypeID >

    < CSRContacts >

    < CSRContact Value = "917" Name = "EVALUATIONS NY[valuations.ny@gmail... com]' > < / CSRContact >

    < / CSRContacts >

    < title >

    < ValueID security = PrimaryID "900158" = "NY-518362" ItemLevel = '2' ItemType = "38" >

    "< rank EffectiveDate =" "2013-01 - 24 T 00: 00:00 ' TerminationDate = ' 0001-01 - 01 T 00: 00:00" comments = "" SecurityDetailID = "429190" > < / row >

    < / security >

    < ValueID security = PrimaryID "900158" = "NY-518362" ItemLevel = '1' ItemType = "38" >

    "< rank EffectiveDate =" "2013-01 - 24 T 00: 00:00 ' TerminationDate = ' 0001-01 - 01 T 00: 00:00" comments = "" SecurityDetailID = "429191" > < / row >

    < / security >

    < / securities >

    < created Value = "2013-01 - 24 T 12: 20:48" > < / creation >

    < ValueID '37126' = CreatedBy > < / CreatedBy >

    < LastModified Value = "2013-02 - 21 T 01: 56:00" > < / LastModified >

    < ValueID = '18732' LastModifiedBy > < / LastModifiedBy >

    < ReportDefinition ValueID = "1" > < / ReportDefinition >

    < StartDate = value "2013-01 - 24 T 12: 00:00" > < / StartDate >

    <Comment Value = "time changed according to the dtd VSG mail 25/01/2013 14:27." SVK, & #xD; & #xA; Recipient added by mail from Richard dtd 20/02/2013 09:45. SVK">< / comment >

    < ValueID = "100" PricePercentage > < / PricePercentage >

    < ISDSL Value = "F" > < / ISDSL >

    < ValueID effects = '0' > < / Effects >

    < WorkFlowAction >

    ActiveChangesApproved < action > < / Action >

    < / WorkFlowAction >

    < ValueID = "4" RecertificationFrequency > < / RecertificationFrequency >

    < RecertificationDate Value = "0001-01 - 01 T 00: 00:00" > < / RecertificationDate > "".

    < RecertificationNextDate Value = 'January 24, 2014' > < / RecertificationNextDate >

    < StatementFrequency >

    < SFrequency Value = '1' Type = 'Daily' date limit indicator = "1005" = "F" PDeadline = '990' > < / SFrequency > "

    < / StatementFrequency >

    < value AutoGenerate = "T" > < / AutoGenerate >

    < monetary value = "Us $" > < / currency >

    < SLanguage ValueID = "1" > < / SLanguage >

    < GP2AccountID Value = "480352" > < / GP2AccountID >

    < SalesApproval Value = "F" > < / SalesApproval >

    < RegenerateAfterPartial Value = "F" > < / RegenerateAfterPartial >

    < SalesCoverageTeam >

    < = 'Sales' sales type Value = "14539" NotificationFlag = "N" name ="JEREMY LEVINE [[email protected]]" > < / sales > "

    < / SalesCoverageTeam >

    < OffSystem Value = "F" > < / OffSystem >

    < HolidayCalendar >

    < country value = 'US' > < / country >

    < / HolidayCalendar >

    < GP2AccountStatus Value = "P" > < / GP2AccountStatus >

    < CurrencySecondary / >

    < GP2ParentID Value = '16649' > < / GP2ParentID >

    < StatementPerspective Value = "D" > < / StatementPerspective >

    < DBEntity ValueID = "2" > < / DBEntity >

    < ValueID DisplayClientName = "6892067" Name = "XXXXXXX, NEW YORK" > < / DisplayClientName >

    < FXRates >

    < FXRate >

    < of Value = "EUR" > < / From >

    < value = "Us $" > < /pour >

    < / FXRate >

    < / FXRates >

    < ShowFXRates Value = "T" > < / ShowFXRates >

    < OfficialMTMs Value = "F" > < / OfficialMTMs >

    < ExcludeStructuredTrades Value = "F" > < / ExcludeStructuredTrades >

    < ValueID = "1" DisclaimerID > < / DisclaimerID >

    < TradeRisk Value = "F" > < / TradeRisk >

    < MTMsInTradeCurrency Value = "F" > < / MTMsInTradeCurrency >

    < / ValuationRequest >

    Thanks in advance.

    with t as)

    Select xmltype (')

    http://www.w3.org/2001/XMLSchema-instance"container ="http://www.w3.org/2001/XMLSchema"ValueID ="169821"Version ="2.6"xmlns ="http://XBank.FxVals/ProcessValuationRequest.xsd"Status ="AC">

    ActiveChangesApproved

    [email protected]]">

    ') double x

    )

    Select comment_text

    t,.

    XMLTable)

    XmlNamespaces (default 'http://XBank.FxVals/ProcessValuationRequest.xsd'),

    «ValuationRequest / / comment»

    go x

    columns

    comment_text varchar2 (200) path "@Value"

    )

    /

    COMMENT_TEXT
    --------------------------------------------------------------------------------------------------------------------------------------
    Time changed according to the dtd VSG mail 25/01/2013 14:27. Beneficiary SVK added according to mail from Richard dtd 20/02/2013 09:45. SVK

    SQL >

    SY.

  • DV7 - 7333cl: how to extract usable data from a bad drive using 22 pins adapter usb to SATA on the new HD

    Greetings HP Forum,

    Recently, I replaced a bad hard drive on my laptop. I need now step by step procedure to extract usable data from the wrong drive using 22 pins adapter usb to SATA on the new HD.

    NOTE: I can't not all data that especially if some of the software downloaded on the replaced disk can be altered. Should I first download Internet Antivirus to protect my new hard drive? I'm not an expert, or even close to this when you work on the back of the laptop, so I'll have to step by step how to download and to partition the data recoverable and software, etc..

    Thanks in advance for your help... I greatly appreciate it!

    See you soon!

    Wes

    It is not complex. Attach the drive to the adapter and connect it to any other computer with good antivirus and antispyware installed. I use Malwarebytes and Avast. When you connect the adapter with the drive connected to the usb port, the drive will appear and it will be assigned a letter maybe E:\ or F:\ or something else. Immediately, he analyzes with the antivirus and anti-spyware. Quarantine or delete any virus or malware it finds. Then, it's just a matter of navigate the disk and copy and paste the contents of the host computer in a directory for this purpose. Obviously, you can copy from documents word, photos, music files, but you cannot copy the applications like Microsoft Word, iTunes. Photoshop.  You may need to take ownership of the files on the old hard drive, but Windows will guide you through this. Don't know what else I can answer.

  • extract data from the generic cursor xy graph

    Hi, I'm new in this Forum.

    In my VI I need to extract the data from the graph xy of one cursor to another, how can I do this?

    I want to extract all the data between the two sliders, to develop.

    Thank you

    In addition to everything said altenbach, you want the slider list: property of the Index. That will tell you where in the table of data, the sliders are.

    The attached VI shows how we can work and also meaningless how it can be with common types of XY data.

    Lynn

  • Hi, after all stages of extraction of data from oracle to oracle during the execution of command "start extract ext1" his error giving the Manager does not work, can you please help me. Thank you

    Hi, after all stages of extraction of data from oracle to oracle during the execution of command "start extract ext1" his error giving this handler does not run both source and target, can you please help me. Thank you

    Hello

    The setting should be as below, and not only the port number should be...

    PORT 7809

    Kind regards

    Veera

  • Extract data from the table on hourly basis

    Hello

    I have a table that has two columns date all the hours of the base and the response time. I want to extract data from the date corresponding previous hourly basis with the response time. The data will be loaded into the table every midnight.

    for example: today date 23/10/2012
    I want to extract data from 22/10/12 00 to the 22/10/12 23

    The sub query pulls the date as demanded, but I'm not able to take the time to answer.

    with one also
    (select min (trunc (lhour)) as mindate, max (trunc (lhour)) as AVG_HR maxdate)
    SELECT to_char (maxdate + (level/25), "dd/mm/yyyy hh24") as a LEVEL CONNECTION dates < = * (1) 24;

    Please help me on this.

    Try this

    SELECT * FROM table_nm
     WHERE to_char(hour,'DD') = to_char(SYSDATE-1,'DD')
    
  • Store data from the Serial Port in the buffer and then take action?

    Hello! Everyone,

    I'm new to LabVIEW and I take assistance from various videos and stuffs available online to get started with LabVIEW.

    But I have a duty, therefore needing help.

    initially I see some of the tutorial videos and learned about the LabVIEW interface, and does a little project to communicate with the Port series (receiving and sending data).

    Happens to my task.

    My LabVIEW application will send a few State request packets on my device or control and based on the response packet that I have to display values.

    The Structure of package is as

    Header, length, Op_Code, data Checksum

    There is no terminator as newline or carriage return or anything else.

    In C language, I read the data from the Serial Port, and based on the length, I conclude that I got the full package or not, and then by recalculating the checksum value, the integrity of the package is verified and then based on that Op-Code has been sent will be decided.

    (I'm dealing with hexadecimal data)

    But how can I do this in LabVIEW.
    A tutorial or any referece will be useful for me.

    1. I suggest that you learn to use Shift Registers instead of local and global variables.  They are much more efficient (memory and execution speed) and make it much easier to read the schema.

    2. you don't need this inside the loop property node.  Is there a way to configure a Serial Port to turn off the stop character.

    3. you don't need to wait for playback VISA will limit the rate of loop if no data is coming.

    4. Once you have the length, you simply read the rest of the entire message and process it at a time.  This will make things a LOT faster.

    5. you should really do this enum a def type so that you can ensure that all your enum constants have the same values.  If you need to add a State later, simply update your enum in the same place then.

  • Pulling data from the SAP ERP system in ColdFusion

    Has anyone tried to extract data from the SAP ERP system in ColdFusion?
    Y at - it any documentation on how to do this?

    Any help and suggestions would be very appreciated.

    Thank you, Rob.

    You are right. I don't know Java and when I looked at JCo stuff, I got confused.
    Thnaks for recommend bTalk. I met with them soon.

  • Remove data from the HD Server?

    I've recently updated my OS to 10.12 Sierra and went to install Server.app. However, when trying to install Mac OS Server, I received the following message:

    "This the server version does not support upgrading the server from data on this volume. To upgrade your database server, you need to install an older version of the server and OS X."

    ***? In what universe would be an acceptable solution? Now, the fact is that I probably had installed Server.app before on a very old version of Mac OS (not sure which) and just never bothered to upgrade during the last major revision of OS X or more.

    What that is, how can I get rid of these old "data server" so I can install a new copy? Thank you.

    Wondering how to remove the data from the server that you had before the upgrade to Sierra? If so, delete the folder/Library/Server and the.app to / applications. Then go to the App Store and buy the latest version of the server. I'm guessing that your last purchase server had Yosemite and that's why try to install the server to the App Store / Shopping does not work. I did purchase the server from Yosemite.

  • How to erase data from the iphone if I lost and iphone is offline

    How to erase data from the iphone if I lost and iphone is offline

    < post branched out by host >

    Hello

    What to do if your iOS device is turned off or offline?

    If your missing device is turned off or offline, you can still implement this Mode lost, lockor remote wipe. The next time your device is online, these measures will take effect. If you remove the device from your account while it is offline, pending actions for the device will be cancelled.

    If your iPhone, iPad or iPod touch is lost or stolen - Apple supports

  • My browser is running do not. I uninstall, install several times. Uninstall cookies, delete the data from the user, install in another user - no reaction. What's wrong? Help, please

    My browser is running do not. I uninstall, install several times. Uninstall cookies, delete the data from the user, install in another user - no reaction. What's wrong? Help, please

    Start Firefox in Safe Mode {web link} by holding down the < shift >
    (Mac options)
    key and then from Firefox. Is always the problem?

    Start your computer in safe mode with network. Then launch Firefox.
    Try the sites secure web. Is always the problem?

    Start the computer in Mode safe;
    Free online encyclopedia

  • Unable to delete the data from the Safari Web site...

    Hello.

    I need help with my Safari browser on my Mac.

    Im trying to remove all Web site data with the following procedure:

    Safari-> Preferences-> privacy-> Remove All Data Web site...

    His does not work. Before clicking on the button I have 108 Web sites stored cookies or other data, I click the button, and nothing happens... I'm still 108 cookies.

    I also did the following:

    . - activate the Menu developer and Cache empty and tried again... nothing

    . - used CleanMyMac v3 and it says I don't have cookies.

    . - order iCloud Sync of Safari on the computer and try again... same problem

    . - removed manually com.apple. Safari. Secure

    Any help will be great. Please let me know if you need any additional info.

    Thank you.

    Hello DZanvettor,

    Thank you for using communities of Apple Support.

    If I understand your message that nothing happens when you try to remove the Safari Web site data. I know how it is important for you to be able to remove the Safari Web site data. I recommend that you restart your Mac into safe mode and see if you can remove the data from the Web site in secure mode.

    Here are the steps to restart your Mac in safe mode:

    Safe mode (sometimes called secure boot) is a way to start up your Mac so that it performs certain checks and prevents certain software from loading automatically or opening.

    From your Mac in safe mode does the following:

    * Check your startup disk and attempts to fix problems if necessary directory
    * Loads only required kernel extensions
    * Prevents the elements start and the login items open automatically
    * Disables installed user fonts
    * Delete font caches, hiding the kernel and other files of the system cache
    * Together, these changes can help resolve or isolate issues related to your startup disk.

    Follow these steps to start in safe mode.

    1. start or restart your Mac.
    2. as soon as you hear the startup tone, hold down the SHIFT key.
    3. release the SHIFT key when you see the Apple logo appears on the screen.

    After you delete data from the Web site in safe mode restart your Mac and allow it to start up as usual. Then test the issue again.

    Best regards.

  • How to recover data from the browser tabs?

    Hello

    I am trying to retrieve data from the Firefox browser by dragging the tabs in a Windows/Mac/Linux application. Specifically, I was hoping to capture medadata HTML and video current time (for example, 01:23 05:00) YouTube pages for storage off favorite browser and reactivation.

    I couldn't find an online help or the documentation dealing with this issue.
    Any suggestions?

    Thank you

    There is an additional command that is added at the end of the url of Youtube. You need to add & = t * m * s at the end of the url. Where the asterisks are, replace you them with numbers. For example: http://www.youtube.com/watch?v=Zb7gTeLmpHs & t = 3m24s

    The m is s for seconds and minutes.

    You can also find this information by loading a video from Youtube, by dragging the time slider to the time you want to pause the video, and then right-click on the video and choose:

    'Copy the URL of the video at the present time'.

Maybe you are looking for

  • Satellite P Series: Volume knob problem

    The volume on my P200 dial only turns the sound down regardless of the direction in which I turn it on. Someone at - it ideas?

  • I want to replace a HD from 40 GB to 80 GB, both are Windows XP, what is the best way?

    I tried to pass the 40 GB, 80 GB HD, but I'm doing something wrong or not at all. I think I do something wrong about the pilots. Advice would be appreciated. SID Spence'

  • SNMP v3

    Hi guys HDS does support SNMP v3? In our network, only SNMP v3 is allowed. Cheers, Dani

  • Mobility of the user

    Hi Pros, My configuration: CRS 4.0.2 CCM 4.1.3 Cisco IP phones, 7902 Cisco CAD 6.1 My query: My agents should be mobile. They are able to connect from any pc. I need mobility to phones too. My Qs: (1) my agents maybe associated with more expansion (C

  • Migrate from PC to Mac

    my PC for my photos directory is C:\pictures\users\jimdad\picturesmy PC for my catalog directory is C:\lr5ciib\LR5_PSE11_Import_from_LT_2013_06_15my catalogue LR6 name is LR5__PSE11_Import_from_LT_2013_06_15 - 2.lrcatmy data LR6 directory is named LR