PLSQL read value from XML?

You can use the EXTRACTVALUE function to obtain this value. This function takes two or three parameters: an XMLTYPE object that contains an XML document an XPath expression that identifies where in the XML the value we want is (optional) an extra string that binds namespace prefixes to URIs In the query below, I've taken the XML you presented above as a string and have created an XMLTYPE object from it. I then use EXTRACTVALUE to get the value you asked for: SELECT EXTRACTVALUE(XMLTYPE( ' There is 23142 Files!'), '//SOAProxyResult', 'xmlns="http://tempuri.org/"') AS result FROM dual The XPath expression SOAProxyResult merely returns all SOAProxyResult elements in the document.

The third argument to EXTRACTVALUE binds the default namespace to http://tempuri.org This is necessary because the SOAProxyResult element in your XML document is within this namespace If I run this query, I get the following output: RESULT -------------------------------------------------------------------------------- There is 23142 Files! From here, it should hopefully be a trivial modification to put the result of this query into a variable.

You can use the EXTRACTVALUE function to obtain this value. This function takes two or three parameters: an XMLTYPE object that contains an XML document. An XPath expression that identifies where in the XML the value we want is.(optional) an extra string that binds namespace prefixes to URIs.In the query below, I've taken the XML you presented above as a string and have created an XMLTYPE object from it.

I then use EXTRACTVALUE to get the value you asked for: SELECT EXTRACTVALUE(XMLTYPE( ' There is 23142 Files! '), '//SOAProxyResult', 'xmlns="http://tempuri.org/"') AS result FROM dual; The XPath expression //SOAProxyResult merely returns all SOAProxyResult elements in the document. The third argument to EXTRACTVALUE binds the default namespace to http://tempuri.org/.

This is necessary because the SOAProxyResult element in your XML document is within this namespace. If I run this query, I get the following output: RESULT -------------------------------------------------------------------------------- There is 23142 Files! From here, it should hopefully be a trivial modification to put the result of this query into a variable.

There was a good article in the Oracle Magazine a while back - which may help you: oracle.com/oramag/oracle/01-jul/o41xml.html Another thing that we use quite commonly here is the XMLType API, but of course it depends on how your are storing / holding your XML data: download.oracle.com/docs/cd/B10501_01/ap....

Thanks, I will try to dig in it ;-) – Data-Base Feb 16 at 13:51 I can not figure out a simple way to just read these value! – Data-Base Feb 16 at 14:57 Its because it isn't as simple as you would like it to be! – diagonalbatman Feb 16 at 15:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions