Why my XMLTable function does not work?
Hello
I'm reading my XML document using a function XMLTable, because a repetition of elements may occur. I wrote a SQL script to test this feature, but it does give me the desired output. This is my script. I use a shadow table PETER_XML to pass the value to the function XMLTable. I would have rather done it directly with a PL/SQL variable, but it does not work.
CREATE TABLE PETER_XML (AVY XMLTYPE);
Set serveroutput size 100000
set echo on
Set of feedback on
declare
cursor c_avy is
SELECT XMLRESPONSE. DepartureStation' DEPARTURE,
XMLRESPONSE. "" Flight "FLIGHTNR
OF PETER_XML.
XMLTABLE (XMLNameSpaces ('http://schemas.navitaire.com/WebServices' as "web", ))
' http://schemas.xmlsoap.org/SOAP/envelope/ "as"soapenv", "
' http://schemas.Navitaire.com/webservices/servicecontracts/BookingService ' as 'book',
' http://schemas.Navitaire.com/webservices/DataContracts/booking ' as "Book1",
' http://schemas.Microsoft.com/2003/10/Serialization/Arrays ' as "arr",
' http://schemas.Navitaire.com/webservices/DataContracts/common/enumerations ' as 'enum',
' http://schemas.Navitaire.com/webservices/servicecontracts/BookingService ' as 'ns0',
' ( http://schemas.Navitaire.com/webservices/DataContracts/Booking ' as 'ns1'),
' / / GetAvailabilityRequest/TripAvailabilityRequest/AvailabilityRequests/AvailabilityRequest.
PETER_XML OF PASSAGE. AVY
COLUMNS
"DepartureStation' VARCHAR2 (3) path"DepartureStation. "
'Flight' varchar2 (4) WAY 'flight '.
) XMLRESPONSE.
"" "clob l_response: = ' < soapenv:Envelope xmlns:soapenv ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:web ="http://schemas.navitaire.com/WebServices"xmlns:book ="http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService"xmlns:book1 ="http://schemas.navitaire.com/WebServices/DataContracts/Booking"xmlns:arr ="http://schemas.microsoft.com/2003/10/Serialization/Arrays"xmlns:enum ="http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations">" "
< soapenv:Header >
bnuOiHCVb3k < web: Signature > = | GX + eTRcZ5ABozAy8MosBFwagyUw7zrRXf1iprmw9Q4W17wt8SDpjYV2HwZRGIHYtE46UFBJw/aFyKVqjToEAfSTfh7cePm4r9JJwcIveDc75NuxnzoY14pKC + WLYDzE0MaALra4i/tI = < / web: Signature >
< web: ContractVersion > 340 < / web: ContractVersion >
< / soapenv:Header >
< soapenv:Body >
< ns0:GetAvailabilityRequest xmlns:ns0 = "http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService" > ""
< ns1:TripAvailabilityRequest xmlns:ns1 = "http://schemas.navitaire.com/WebServices/DataContracts/Booking" > ""
< ns1:AvailabilityRequests >
< ns1:AvailabilityRequest >
< ns1:DepartureStation > AMS < / ns1:DepartureStation >
< ns1:ArrivalStation > CTA < / ns1:ArrivalStation >
< ns1:BeginDate > 2013-07-13 T 00: 00:00 < / ns1:BeginDate >
< ns1:EndDate > 2013-07-13 T 00: 00:00 < / ns1:EndDate >
< ns1:CarrierCode > HV < / ns1:CarrierCode >
< ns1:FlightNumber > 547 < / ns1:FlightNumber >
< ns1:FlightType > all < / ns1:FlightType >
< ns1:PaxCount > 1 < / ns1:PaxCount >
< ns1:Dow > by day < / ns1:Dow >
< ns1:CurrencyCode > EUR < / ns1:CurrencyCode >
< ns1:DisplayCurrencyCode > EUR < / ns1:DisplayCurrencyCode >
<!-ns1:SourceOrganization > COO < / ns1:SourceOrganization->
< ns1:MaximumConnectingFlights > 0 < / ns1:MaximumConnectingFlights >
< ns1:AvailabilityFilter > by default < / ns1:AvailabilityFilter >
< ns1:ProductClassCode > NG < / ns1:ProductClassCode >
< ns1:SSRCollectionsMode > None < / ns1:SSRCollectionsMode >
< ns1:InboundOutbound > so < / ns1:InboundOutbound >
< ns1:NightsStay > 0 < / ns1:NightsStay >
< ns1:IncludeAllotments > true < / ns1:IncludeAllotments >
< ns1:FareTypes >
< ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays" > T < / ns2:string>
< / ns1:FareTypes >
< ns1:PaxPriceTypes >
< ns1:PaxPriceType >
< ns1:PaxType > ADT < / ns1:PaxType >
< / ns1:PaxPriceType >
< / ns1:PaxPriceTypes >
< ns1:JourneySortKeys >
< ns2:JourneySortKey xmlns:ns2 = "http://schemas.navitaire.com/WebServices/DataContracts/Common/Enumerations" > EarliestDeparture < / ns2:JourneySortKey>
< / ns1:JourneySortKeys >
< ns1:IncludeTaxesAndFees > false < / ns1:IncludeTaxesAndFees >
< ns1:FareRuleFilter > by default < / ns1:FareRuleFilter >
< ns1:LoyaltyFilter > MonetaryOnly < / ns1:LoyaltyFilter >
< ns1:TravelClassCodeList >
< ns2:string xmlns:ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays" > Y < / ns2:string>
< / ns1:TravelClassCodeList >
< / ns1:AvailabilityRequest >
< / ns1:AvailabilityRequests >
< ns1:LoyaltyFilter > MonetaryOnly < / ns1:LoyaltyFilter >
< / ns1:TripAvailabilityRequest >
< / ns0:GetAvailabilityRequest >
< / soapenv:Body >
< / soapenv:Envelope > ';
Start
dbms_output.put_line ('Start');
insert into peter_xml (avy) values (XMLTYPE (l_response));
dbms_output.put_line ('Insert processed' | to_char (sql % rowcount) |) "lines.") ;
for r_avy loop c_avy
dbms_output.put_line ('Start' | r_avy.departure |) "Flightno. ' | r_avy.flightnr);
end loop;
end;
/
Rollback;
The script works well, but the problem is that I don't get any kind of output the cursor of the loop for. When I speak to elements using "ns1:etc", I get an error, which suggests that the service is actually read the XML. Since there was no way out, I started to including all these XMLNameSpaces.
Can someone let me know what Miss me?
And if I can pass the value to a PL/SQL variable, it would save me the use of a fictitious table. That would be nice.
Thanks in advance.
Peter
Hi Peter,.
Since there was no way out, I started to including all these XMLNameSpaces.
All these namespaces have a meaning, do not blindly, include them but if you do, use.
The main manifestation of XQuery does not reference all the necessary namespaces.
Here is a simplified version that gives the expected results.
Please note that I only use namespaces I want to solve the XQuery:
declare
c_avy (p_xmlresponse in xmltype) cursor is
Select x.DEPARTURE
x.FLIGHTNR
from xmltable)
XmlNamespaces)
"http://schemas.xmlsoap.org/soap/envelope/" as "SOAP."
, 'http://schemas.navitaire.com/WebServices/ServiceContracts/BookingService' as 'ns0 '.
, "http://schemas.navitaire.com/WebServices/DataContracts/Booking" as "ns1."
)
, ' /: soap envelope / soap: Body / ns0:GetAvailabilityRequest / ns1:TripAvailabilityRequest / ns1:AvailabilityRequests / ns1:AvailabilityRequest'
passage p_xmlresponse
columns
Trajectory of DEPARTURE VARCHAR2 (3) 'ns1:DepartureStation '.
, Path of varchar2 (4) FLIGHTNR 'ns1:FlightNumber '.
) x ;
"" l_response clob: = "http://schemas.xmlsoap.org/soap/envelope/
';
Start
for r_avy in c_avy (xmltype (l_response)) in a loop
dbms_output.put_line ('Start' | r_avy.departure |) "Flightno. ' | r_avy.flightnr);
end loop;
end;
/
In fact, you don't need an intermediate table for this requirement. However, and according to your version of db, store the XML in a binary XMLType table can significantly improve performance.
For makers in small, you probably won't see a difference between the two approaches, but just so you know in the case where you have to face in the future with big XMLs.
Tags: Oracle Development
Similar Questions
-
Why the selective function does not work.
I used Adobe 2, 4 and 5 years. I frequently ask selective highlights or sharpness in an image using the layer to double orders, highlights, adjusting the image, layer mask, hide all. When I try to apply selective effects using brush nothing happens. ??? How can I solve this problem? I appreciate your help.
Ted
Ted,
There are a few things that could cause that. The most obvious is that you use not perhaps not the right color (transparent, visible/black-white) or maybe the opacity of the brush has been set to a low value. If not, the next thing I would do is to check and make sure that you have the thumbnail of the layer selected and not mask the image layer in the layers panel. If this does not work, could you upload a screenshot?
Jason
-
Why my attachments function does not work in Windows Live Hotmail?
Original title: why my attachments do not work?
I have problems with getting documents to include as an attachment. Never had this problem with hotmail before. What I am doing wrong? How can I find someone to HELP me?
Hi BrendaRuschenberg,
1. what browser do you use?
2. don't you make changes on your computer before this problem?
3 are you facing this problem only with Windows Live Hotmail?
If you use Internet Explorer, you can follow the steps in this link & check if the problem persists.
Cannot download file - join my Hotmail email
Hope the helps of information.
Please post back and we do know. -
Why addChild (new Shape()) does not work?
I would like to know why the following code does not work:
< mx:Application >
..
private function doShape (): void {}
var aShape:Shape = new Shape();
this.addChild (aShape);
}
..
< mx:Button click = "doShape ()" / > "
< / mx:Application >
According to the docs, addChild() takes a DisplayObject instance as a parameter. The shape is a DisplayObject. However, I get an error (#1034) that the form cannot be converted to mx.core.IUIComponent
I don't understand what the problem...Yes, it's always a witch hunt in a first time. Flex containers (for example, canvas, Panel, etc) may have only UIComponents and children, not only of DisplayObject. The thing is, one UIComponent can have simple DisplayObjects as children, so you have to wrap your form:
var temp: UIComponent = new UIComponent();
temp.addChild (aShape);
this.addChild (temp); -
Question
I want to record with < alt > < s > in the Exact program online. This function does not work. This is the first time I use this program with firefox.edit, escaped mod < s > in order to avoid the line through question
A web page can be defined a "accesskey" for an item. Unlike IE/Chrome/Safari, who use the Alt key only, Firefox requires pressing Alt and Shift to activate the element. In other words, try
ALT + SHIFT + S
and see if it works.
I don't know of any way to change this so that the change is not necessary. There may be an add-on?
-
Satellite Pro 6000; sleep function does not work after upgrade W98 SE to XP
I bought a windows XP cd and installed on W98 on my Satellite Pro 6000. The sleep function does not work now. I probably need a software of Toshiba. What do I need? Where can I find? What is the order of installation?
Hello
All drivers Windows XP Home edition, tools and utilities you can find on Toshiba support page under http://eu.computers.toshiba-europe.com > support & downloads. You have old laptop model and because of this type of product, you choose option ARCHIVE.
Order of the facilities is as follows:
-Windows XP
-Display driver
-Audio driver
Toshiba - common modules
-SD Card host driver
-SD Card Driver
-BlueTooth Stack
BlueTooth - Easy Connect
-Mouse driver
-Modem driver
-LAN driver included with Windows XP
-Infrared driver
-Toshiba Power Saver
Utilities - Toshiba
Toshiba - post Mobile
-Toshiba Console worm.
-Toshiba Hotkey for display devicesI hope that you will be able to install Windows XP Home edition successfully.
Good luck!
-
curve adjustment function does not work
Hi all
I am trying to bend fitting, a graphic. but the curve adjustment function does not work. I get no output curve.
which suggests to me u.
Thank you
You have been asked to view the code. We cannot solve the photos.
Matrices X and Y are same length? Is a NaN value? What the output error say you?
(Also note that in this case, it would be convenient if we don't need to wire x take a look at this idea!)
This discussion is useless until you attach a real VI and data, so please.
-
My gesture control function does not work correctly there on and off automatically
My gesture control function does not work correctly there on and off automatically
which application you are using? try reinstalling the media gallery.
-
Why xbox 360 controller does not work with all pc games
Why xbox 360 controller does not work with all pc games
Ask in an xbox forum.
-
Why any screen recorder does not work on my computer? __
Why any screen recorder does not work on my computer?
Hi I formatted my computer and downloaded all the conditions for this, I downloaded hypercam and installed, I tried to open it in the tool bar and the start menu, it still does not work.
I downloaded another program for recording of the screen, it also did not work, I tried 3 programs, they all did not work
by the way my computer: windows vista service pack 2 and the screen recorders have worked before I formatted my laptop
I need a solution pleaseeeeeeI got this error in the three programs
Signature of the problem:
Problem event name: APPCRASH
Application name: ScreenVCR.exe
Application version: 1.5.34.0
Application timestamp: 2a425e19
Fault Module name: StackHash_b4c3
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception code: c0000096
Exception offset: 02e42a3b
The system version: 6.0.6002.2.2.0.768.3
Locale ID: 1033
Additional information 1: b4c3
More information 2: d2a8bebd21e0e9bfa99e084d53ece2b6
3 more information: 74a 3
Additional information 4: 0480b6e0a2e7a1df44ee618ae8d0084fRead our privacy statement:
http://go.Microsoft.com/fwlink/?LinkId=50163&clcid=0x0409Please give me a solution... :(my laptop computers Info
Windows is Windows Vista Home Premium
Intel (r) core (TM) 2 Duo CPU 26500 2.10 GHz
3.00 GB RAM
Mobile Intel (r) 4 Series Express Chipset Family=============================================
Just a thought... maybe your video driver or DirectX needs and update?Have you tried the following applications:
(1) Windows Media Encoder 9 Series
http://www.free-codecs.com/download/Windows_Media_Encoder_9_Series.htmDirect Download Link:
http://www.free-codecs.com/download_soft.php?d=571&s=327First steps with screenshot
Using Windows Media Encoder
http://www.Microsoft.com/windows/windowsmedia/HOWTO/articles/ScreenCap.aspx(2) Microsoft Expression Encoder 4
http://www.Microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=75402be0-C603-4998-A79C-becdd197aa79Expression Encoder training videos
http://expression.Microsoft.com/en-us/cc197144.aspxVolunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.
-
AUTO PLAYBACK FUNCTION DOES NOT WORK
AUTO PLAYBACK FUNCTION DOES NOT WORK WITH MY ADOBE PHOTOSHOP 7
Try to uninstall and reinstall the program. If this does not work, then I suggest that you contact adobe at http://www.adobe.com/support/photoshop/support. This doesn't seem to be a Vista problem - it sounds like a problem with Adobe Photoshop. Lorien - a - MCSE/MCSA/network + / A +.
-
The side-by-side function does not work correctly, windows overlap
original title: sizing windows side-by-side
The side-by-side function does not work correctly, windows overlap. How do fix you this feature?
Hello
It is Aero Snap. When you select a window how you "cutting" it in position? You do not use the window key and the arrow left/right or are you drag / drop window? If you drag / drop, using the keyboard shortcuts help to solve the problem?
Kind regards
Alex T.
~ 2007-2011 MVP Windows desktop experience ~ -
Right-click the folder or any other function does not work, and I don't have a sticky key...
While I click right click in windows Explorer has stopped working... Help, please!
A Virus Scan. Your PC can be infected. If you have not installed it, use MS Security Essentials if you have a genuine Version of Windows. It's free.
-
Win7 64 bit freezes & arrow function does not work, do not click to navigate anywhere
Win7 64 bit PC crashes & arrow function does not work, do not click to navigate anywhere, exceptionally after being on ~ 2 + hrs. I can only turn off by pressing the power switch for about 5 seconds.
Hello
Method 1
Step 1: I suggest to start the computer in safe mode and check if the problem persists.
Start your computer in safe mode
http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-modeStep 2: If the problem is solved in safe mode, then I suggest you perform the clean boot and remove the program that is causing the problem.
http://support.Microsoft.com/kb/929135
Note: Follow step 7 clean boot KB929135 article to reset the computer in normal mode.Method 2
I suggest you try the steps from the following link:Optimize Windows 7 for better performance
http://Windows.Microsoft.com/is-is/Windows7/optimize-Windows-7-for-better-performance
Open event viewer
http://Windows.Microsoft.com/en-in/Windows7/open-Event-Viewer -
Why ctrl + right click does not work with babylon dictionary windows 7
Why ctrl + right click does not work with babylon 8 dictionary. I use a 64-bit windows 7.
Hello
1. facing this problem only with application of Babylon?2. it worked earlier?If you encounter this problem only with Babylon, I suggest you to post your request in the forum of the community of Babylon to better support on this issue.
http://support.Babylon.com/
Maybe you are looking for
-
I disabled Adblock Plus to watch a show on Uverse TV the other day, and when I went to him, again, it had disappeared; so I re-installed, but it's still not there despite the fact that he claims to have installed on my computer.
-
New Linkys AES2500 does not connect
I bought a wireless n adapter for my laptop and the Cisco program allows to install it does not recgoinze the device. I've tried it on 2 other computers and it worked fine (all computers running Windows 7). The USB ports work on the computer and the
-
Smartphones blackBerry-rate issues
Hello. I've known some strange behaviour of my bold 9780 these days and I was hoping someone could help me. I bought the phone a few months ago. He had a few drops of about size high (rate my case). It is on the OS 6 and o have done all updates. The
-
Hello everyone, yesterday my computer was attacked by a Trojan Virus. Now my problem is, after the attack, my library folder can not open, when I click on this matter, I got a restriction message out like that - "this operation has been cancelled due
-
Nice day In fact, we had a power failure at our DC and after restarting servers, 2 of them you have the problem. UCS after the beginning of the VMTMS v 14.4.2 showing in summary "does not installed ' and no Ping able.but I can access Internet by IP h