How to read the xml value in plsql store proc
I need to read the value at the bottom of the xml script in plsql procedure. I do not understand how to write. I'm new in xml, please help me solve this problem.
<? XML version = "1.0" encoding = "UTF-8"? >
< PrtyActDtlRequest >
< AcctInfo >
< > 84188 PartyID < / PartyID >
< RelAcctID > 125148 < / RelAcctID >
< RelAcctID > 251486 < / RelAcctID >
< RelAcctID > 125147 < / RelAcctID >
< RelAcctID > 125511 < / RelAcctID >
< / AcctInfo >
< / PrtyActDtlRequest >
Here < AcctId > can be repeted n times (unbouinded), but < PartyID > is set once. This is the script that we will get out of the source system.
Thanks in advance.
Roy
You needn't PL/SQL for it. Just use XMLTABLE:
with t as)
Select xmltype (')
Select PartyID,
RelAcctID
t,.
XMLTable)
' / PrtyActDtlRequest/AcctInfo.
go x
columns
PartyID path number "PartyID,
Path RelAcctIDXml xmltype "RelAcctID."
),
XMLTable)
'RelAcctID '.
by the way RelAcctIDXml
columns
RelAcctID path number ' / RelAcctID'
)
/
PARTYID RELACCTID
---------- ----------
84188 125148
84188 251486
84188 125147
84188 125511
SY.
Tags: Database
Similar Questions
-
OSB: How to read the xml file, which is in OSB project
Hello
We have a generic proxy (PG1) reporting and deals alerts, this proxy is called in the pipelines of proxies anothers (P1... PN) in several projects. Each client proxy (P1... PN) PN) before call proxy PG1, configures a variable with syntactic alert or report.
We thought it would be a good idea to store the specifications for all the proxies of a project as an xml file, so that the proxy PG could read the xml file. This file will be in the OSB project.
The questions are:
-proxy can read a xml file that is in the OSB project?
S ' Please, are all the documentation for this?
Thank you
Kind regardsYou can always do customization to work with the properties defined in a XML xquery. The key to this is to use the customization of reference instead of find and replace the customization, similar to the service account customizations.
Keep your real estate to as properties_dev of env xquery specific xmls, properties_sit etc then apply customization of service proxy xquery reference reference specific correct env. -
How to read the XML doc in variable with XPath?
Suppose that a variable in BPEL contains an entire XML document as (without the quotes):
"value1 < foo > < bar > < / bar > < bar > value2 < / > < / foo >.
How to read of BPEL an XPath expression with the value of the second
< bar > element in a nother variable "target"?
What do I have to use getvariabledata? How to pass the XPath?
PeterPeter
Here's how you can get there by business to be divested. You can access it by writing the XML expression (do not select foo--> bar directly on the tree) as below
bpws:getVariableData ('Variable_name', 'Foo
','/ NS4:foo / NS4:bar bpws:getVariableData("intCounter") ') and assign it to the variable "target". Here the value of the variable integer "intCounter" represents the nth element under the tag "foo". Let us know if you face any issues. Hope this will help.
-
How to read the xml and save the contents of the ITA in .txt format
Hello
Is it possible to read an xml file and save it in the .txt format. Please let me know if there is a way to do it.
Thank you
Ankit G
That read the function is only for xml files written using the LabVIEW diagram, so if you have something else, you need the functions in the range of xml parser.
-
How to retrieve the XML values in a plsql table type
Hello
I have an XML doc as below which is a Web Service response message.
<? XML version = "1.0" encoding = "UTF-8"? >
< SOAP - ENV:Envelope
xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/".
container = "http://www.w3.org/2001/XMLSchema".
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
< SOAP - ENV:Body >
< GetOrgInput xmlns = "http://www.example.org/ComplianceServices" >
< ProgramName > PgmA-Srsf < / ProgramName >
< > 800 ADSL ItemName < / ItemName >
< org > 923 < / org >
< org > 1163 < / org >
< org > 1103 < / org >
< / GetOrgInput >
< / SOAP - ENV:Body >
< / SOAP - ENV:Envelope >
The doc above, you could see that I have several occurrences of the element "Ent". I usually use the .extract and. getSTringVal() to retrieve the values as below.
l_string_variable: = p_response.doc.extract ('/ /'| p_name |) ' /Child::Text()',p_namespace).getStringVal();
But in this case if I do that, I get value as 92311631103. I need to get them in a table of the number type. Pls advice me on how to do this.
Thank you
PKVI'm guessing it's a bug fixed when Oracle 10.2 is released. I can reproduce your lack of results on 10.1.0.4 and as shown in my post above, it works correctly on 10.2.0.4.
Here is a modification of the script that shows what is happening that I have that debugging. (It took me a bit to realize the difference that it wasn't what I was expecting)
declare p_response_doc XMLTYPE; l_new_doc XMLTYPE; begin p_response_doc := XMLTYPE('
1163 1103 10.2.0.4 on this product
1163 1103 before loop1163 1103 After outputIt produces on 10.1.0.4
1163 1103 before loop 1163 1103 After outputAs you can see, Oracle is to detach (well technically not add) the space of default names to the nodes retrieved. To compensate, you need to change your loop to look like
FOR r_rec IN (SELECT extractvalue(value(t) , '/CompliantOrgs') val -- , 'xmlns="http://www.example.org/ComplianceServices"' ) val -- BULK COLLECT INTO l_nm_array FROM TABLE( XMLSequence( p_response_doc.extract('//CompliantOrgs','xmlns="http://www.example.org/ComplianceServices"') ) ) t ) LOOP
so extractValue does not expect the namespaces associated with the nodes.
I would suggest you document it so that you know why things break if you upgrade to 10.2 or later at some point in the future.
-
How to read the XML stored in a clob value
is it possible to store the date in variable, something like
Select sysdate double dated;
in this query.SELECT XMLFOREST (sysdate as "date") from dual;
SQL> declare clob_val clob; begin select xmlforest (sysdate as "date", dummy as "order").getclobval () into Clob_VAL from dual; dbms_output.put_line(xmltype('
' || clob_val || ' ').extract('e/order/text()').getstringval()); end; / X PL/SQL procedure successfully completed. -
How to read report .xml to a printer?
How to read the .xml report that is sent by e-mail? You open the file with something?
Use the player to open the file. The report should be readable on the side of keft.
-
How to read the value of list boxes by iteration in a loop For?
I have a lot of list boxes on the front of my VI. I want to know how to read the value of this combo with a loop boxes For. The point is that I don't know how to get the reference of each combo box in a loop.
Any information would be welcome. Thank you!
su27 wrote:
I have a lot of combo boxes on the front of my VI [...]
Be sure to close the references that you have finished with them.
-
I use a timer/counter with DAQmx 6602. I use the separation of two - available via DAQmx cash edge. Count between the two edges works properly, however I do not know how to read the value of the counter during the counting operation (i.e. after the first edge triggered the beginning of the count, but before the second edge triggered the end of the counting). I'll have to wait for the second goes off the edge of the end of the countdown until I can get a counter value. I need to be able to access the current value of the County during the count operation. This was possible in traditional DAQ. How can it be accomplished using DAQmx?
Ah shoot - I was afraid that this might be the case (for what it's worth, my series of X returned intermediate values, but the material and the underlying driver are quite different)...
You just need to take one measure at a time or you are buffer several measures of separation of the two edges at the same time? So just to take one measure at a time, you can set a task of edges of count using the database internal time as the source using an arm start trigger (first edge) and a sample of clock (second Board) to work around the problem.
Best regards
-
How to read the values of the field of LOV disabled?
Hi all
I have a requirement, based on values that we entered one of the LOV fields, then we are arising from the new values based on the value that we entered this field of LOV. And then I must by default new LOV values derived in a two other fields of LOV and then disable them. Once the fields are disabled, then I'm not able to read the values using the pagecontext.getparameter... I get nothing when I tried to read using the pagecontext.getparameter.
Pointers on how to read the values of disabled field/LOV?
Thank you
Clarriiza1. you already have values, and that's what you set in the LOV before turning off, right? So why do you need to recover again from the LOV.
2. are you disabling or making it readonly? I think that if it is disabled, you might still be able to get the value using pageContext.getParameter.
3 have you tried to get the handle to the LOV bean and get the value using lovBean.getValue (pageContext)?
4. another Option is to combine the value of a FormValue Bean also (as well as the LOV bean) and retrieve it from FormValue.
5 BTW, why are, why you're seen LOV if you disable it? Can't you just a TextBox?
See you soon
AJ
-
How to read the data with different XML schemas within the unique connection?
- I have Oracle database 11g
- I access it via JDBC: Slim, version 11.2.0.3, same as xdb.
- I have several tables, each has an XMLType column, all based on patterns.
- There are three XML schemas different registered in the DB
- Maybe I need to read the XML data in multiple tables.
- If all the XMLTypes have the same XML schema, there is no problem,
- If patterns are different, the second reading will throw BindXMLException.
- If I reset the connection between the readings of the XMLType column with different schemas, it works.
The question is: How can I configure the driver, or the connection to be able to read the data with different XML schemas without resetting the connection (which is expensive).
Code to get data from XMLType is the implementation of case study:
1 ResultSet resultSet = statement.executeQuery( sql ) ;
2 String result = null ;
3 while(resultSet.next()) {
4 SQLXML sqlxml = resultSet.getSQLXML(1) ;
5 result = sqlxml.getString() ;
6 sqlxml.free();
7 }
8 resultSet.close();
9 return result ;It turns out, that I needed to serialize the XML on the server and read it as BLOB. Like this:
1 final Statement statement = connection.createStatement() ; 2 final String sql = String.format("select xmlserialize(content xml_content_column as blob encoding 'UTF-8') from %s where key='%s'", table, key ) ; 3 ResultSet resultSet = statement.executeQuery( sql ) ; 4 String result = null ; 5 while(resultSet.next()) { 6 Blob blob = resultSet.getBlob( 1 ); 7 InputStream inputStream = blob.getBinaryStream(); 8 result = new Scanner( inputStream ).useDelimiter( "\\A" ).next(); 9 inputStream.close(); 10 blob.free(); 11 } 12 resultSet.close(); 13 statement.close(); 14 15 System.out.println( result ); 16 return result ; 17
Then it works. Still, can't get it work with XMLType in resultset. On the customer XML unwrapping explodes trying to pass to another XML schema. JDBC/XDB problem?
-
How to read the value of an independent textInput element inside the method?
Hello
I had a group of detail based on a readonly viewobject. I added an independent element textInput, you say, EndDate to this group that the user can enter a value inside. Now, when I run the app I select a row in the table and press a button that triggers a method inside a bean. My question is how I read the value in independent textInput (EndDate) within the method element?
getTable () .getRowData () does not print the unbound attribute. It seems that it only contains attributes underlying viewobject
I use JDev 11.1.1.4
Kind regards
Will doWill do,
You can better create a transitional attribute for that in your view object, so you can use a regular expression #{row.bindings...} to get the value.
Steven Davelaar,
JHeadstart team. -
How to read the value attribute and put inside?
What happens if we want to read the attribute value? And want to put the data of runtime on the value of the attribute as
< psoID ID = "user id" / >
How to get the value of the ID as the user id. And how to put the run value on it?
I can think about is that
/psoID/@ID/value GOLD psoID/@ID/*[local-name () = 'value']
And how to put the value inside ID ="? »
Thank youBecause we are dealing with a structure of type anyType you must use the functions of node (local name) in combination with predicates ([]) to read or write values (node) of the element:
To read the value for example use the copy rule:
This wil read:
/processResponse/result/psoID/@ID
on the message:
You will see the value 'B '.
To write, you use:
Kind regards
Melvin
-
How to read the value of the javascript component text entry
Hello
I need to add ' / ' after user entering the first two characters and before entering the third character of character to the value of input text.
To meet this requirement, I add a clientListener of type keyPress to input text element.
My question is how to read the value entered by the user to input text in java script component (the clientListener method).
I faked my requirement in a sample application @ http://www.easy-share.com/1912896093/format.7z
Please help solve this problem.
Thank you
KiranFor setting/getting the value, you can even view:
function keyPress (event) {}
component = event.getSource ();
Alert (Component.getSubmittedValue ());
{component.setValue ("new value '");}
]]>
Thank you
Nini -
10g: how to read a key/value registry, the mac address
Dear,
I have developed an application using Forms 10 g. I need in a certain place to read a registry key for windows server 2003 on which the application server is installed.
I know how to read the registry on the Client computer using webutil. But is there any other utility to read registry of the application server?
Or I have to use D2KWUTIL in my form?
Also, I need to read different physical address on the application server.
Help, please
Thank you very much.I do not remember where, but you can download it from there.
François
Maybe you are looking for
-
OK, here's a list for you fix, please.
1.A better save as homepage!2 when I press the use current pages I mean my pages not the page setting. :))3.A way around unsecured site or what ever.itof my choice which site to enter, not yours.More visible 4.A. Turning to reset the browser in adava
-
Re: upgrade Satellite A100-232 memory
I want to be as sure as I can be, I already bought memory from Crucial - it does not work... so I want to be sure that I understand the next time. Satellite A100-232, currently has 512 MB - I believe that I can go up to 2 GB and understand that 2 x 1
-
LCD screen broken on Equium A60
Hello Where is the best place to buy a new LCD screen for my laptop Toshiba Satellite A60? I live near Guildford, Surrey.Thank you very muchSimon
-
Numbers of string to byte array
I try to use "Byte array to string" if I display the byte array, I can see the last two items are the numbers 4-8 (ASCII 52 56) but when I use the "Byte Array to necklace" and add an indicator of the 48 is missing? Ignore this palette number 0-9? I
-
Windows 7, problem with update
I am facing the problem with the release of windows 7, it shows the error code 80070570 and 800 b 0100.I can't find a solution, how to address this issue.