Can not validated against the schema

I have the following XML

< HTNG_HotelRoomStatusSearchRS

" xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

" xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

Version = "7,000".

           xmlns=" http://HTNG.org/2014B "

" xsi: schemaLocation =" http://HTNG.org/2014B ' HTNG_HotelRoomStatusSearchRS.xsd '

TimeStamp = "" 2015-04 - 29 T 15: 42:25Z ""

Target = "Test" TargetName = "AUS".

TransactionIdentifier = "12345" >

< success > < / success > < errors > < error Type = '0' doc 'None' = > < / error > < / errors >

< RoomInformationList >

< TPA_Extensions >

< TPA_Extension > < DEVICE UNIT_NUM = "pm_unit_num" UNIT_TYPE = "pm_unit_type_desc" HSK_DESC = "CLN".

ROOM_STATUS = "EMPY" STATUS_CODE = 'HERE', ARRIVAL_DATE = 'NOW' DEPARTURE_DATE = 'THEN' RESV_TYPE = 'RT '.

"DRI_PROP_ID ="DPI"RESV_NUM ="RN"CREATE_DATE ="CD"MC_PROPERTY_CODE ="MPC"HOTEL_DATE =" HD "SERVICE_CODE = 'SC' > < / UNIT >

< / TPA_Extension > < / TPA_Extensions > < / RoomInformationList > < / HTNG_HotelRoomStatusSearchRS >

I'm trying to validate

<? XML version = "1.0" encoding = "UTF-8"? >

" < xs: schema xmlns: XS =" http://www.w3.org/2001/XMLSchema "

                   xmlns=" http://HTNG.org/2014B "

" xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

" targetNamespace = ' http://HTNG.org/2014B "

oraxdb:numProps = "6".

elementFormDefault = "qualified".

version = "1.000".

ID = "HTNG2014B".

' xmlns:oraxdb = ' http://xmlns.Oracle.com/xdb "" "

oraxdb:storeVarrayAsTable = 'true '.

oraxdb:flags = "2105635".

oraxdb:schemaURL = "HTNG_HotelRoomStatusSearchRS.xsd"

oraxdb:schemaOwner = "CLY" >

< xs: include schemaLocation = "HTNG_SimpleTypes.xsd" / >

< xs: include schemaLocation = "HTNG_CommonTypes.xsd" / >

" < xs: import namespace = ' http://www.OpenTravel.org/OTA/2003/05 "schemaLocation ="OTA_CommonTypes.xsd"/ > "

< xs: annotation >

< intention XML: lang = "fr" > This message is in response to a HTNG_HotelRoomStatusSearchRQ message. < / intention >

< / xs: annotation >

< xs: element name = "HTNG_HotelRoomStatusSearchRS" oraxdb:propNumber = '7324' oraxdb: global = "true" oraxdb:SQLName = "HTNG_HotelRoomStatusSearchRS" oraxdb:SQLType = "HTNG_HotelRoomStatusSea2173_T" oraxdb:SQLSchema = "CLY" oraxdb:memType "258" = >

< complexType oraxdb:SQLType = "HTNG_HotelRoomStatusSea2173_T" oraxdb:SQLSchema = "CLY" >

< xs:complexContent >

< xs:extension base = "HTNG_ResponseBaseType" >

< xs: SEQUENCE >

< xs: element name = "RoomInformationList" oraxdb:propNumber = '7323' oraxdb: global = "false" oraxdb:SQLName = "RoomInformationList" oraxdb:SQLType = "RoomInformationList2174_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

< xs: annotation >

< intention XML: lang = "fr" > the result set generated by the query sent to the application. < / intention >

< / xs: annotation >

< complexType oraxdb:SQLType = "RoomInformationList2174_T" oraxdb:SQLSchema = "CLY" >

< xs: SEQUENCE >

< xs: element name = "Rooms" minOccurs = "0" maxOccurs = "unbounded" oraxdb:propNumber = '7322' oraxdb: global = 'false' oraxdb:SQLName = 'Rooms' oraxdb:SQLType = "RoomInformation2175_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" oraxdb:SQLCollType = "RoomInformation2176_COLL" oraxdb:SQLCollSchema = "CLY" >

< xs: annotation >

< intention XML: lang = "fr" > a container element used to hold room and reservation information. < / intention >

< / xs: annotation >

< complexType oraxdb:SQLType = "RoomInformation2175_T" oraxdb:SQLSchema = "CLY" >

< xs: SEQUENCE >

< xs: element name = "Room" type = "HTNG_RoomElementType" oraxdb:propNumber = '7319' oraxdb: global = "false" oraxdb:SQLName = "Room" oraxdb:SQLType = "HTNG_RoomElementType2044_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

< xs: annotation >

< intention XML: lang = "fr" > used to pass on information about a room or suite room components compound. < / intention >

< / xs: annotation >

< / xs: element >

< xs: element name = "HotelReservations" type = "ota:HotelReservationsType" minOccurs = "0" oraxdb:propNumber = "7320" oraxdb: global = "false" oraxdb:SQLName = "HotelReservations" oraxdb:SQLType = "HotelReservationsType1709_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

< xs: annotation >

< intention XML: lang = "fr" > used to pass on information about the booking and/or its supporting comments. < / intention >

< / xs: annotation >

< / xs: element >

< xs: element name = "TPA_Extensions" type = "ota:TPA_ExtensionsType" minOccurs = "0" oraxdb:propNumber = '7321' oraxdb: global = "false" oraxdb:SQLName = "TPA_Extensions" oraxdb:SQLType = "TPA_ExtensionsType174_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

< xs: annotation >

< intention XML: lang = "fr" > This is used to Exchange custom/setting values in work - specific as are agreed between the trading partners. < / intention >

< / xs: annotation > < / xs: element > < / xs: SEQUENCE > < / xs: complexType > < / xs: element > < / xs: SEQUENCE > < / xs: complexType > < / xs: element > < / xs: SEQUENCE >

< / xs:extension > < / xs:complexContent > < / xs: complexType > < / xs: element > < / xs: Schema >

I'm creating the document. I can't it's the basic scheme.

DECLARE

CURSOR c_info

IS

(SELECT XMLELEMENT

'HTNG_HotelRoomStatusSearchRS '.

xmlattributes)

                       ' http://www.OpenTravel.org/OTA/2003/05 "AS"xmlns:ota" "

                      ,' http://www.w3.org/2001/XMLSchema-instance ' AS ' xmlns: xsi "

, "7,000"AS "Version".

                      ,' http://HTNG.org/2014B ' AS 'xmlns'

                      ,' http://HTNG.org/2014B HTNG_HotelRoomStatusSearchRS.xsd' AS "xsi: schemaLocation"

, TO_CHAR (SYSDATE, "DD-MM-YYYY")

|| ' T '

|| TO_CHAR (SYSDATE, 'HH24:MI:SS')

|| 'Z' AS 'TimeStamp '.

CASE WHEN gn.global_name = 'ATLAS' AND 'Production' ELSE 'Test' END as 'Target'

, 'AUS' AS 'TargetName '.

"12345" AS "TransactionIdentifier")

XMLELEMENT ("Success")

, XMLELEMENT ("Errors", XMLELEMENT ("Error", xmlattributes ('Type', 'None' AS 'Doc' of "0")))

XMLELEMENT ("RoomInformationList",

XMLELEMENT ("TPA_Extensions",

XMLELEMENT ("TPA_Extension",

XMLELEMENT ("UNIT"

xmlattributes ('pm_unit_num' AS 'UNIT_NUM'

, 'pm_unit_type_desc' AS 'UNIT_TYPE.

, "CLN" AS "HSK_DESC".

, "EMPY" AS "ROOM_STATUS".

, 'HERE' AS 'STATUS_CODE '.

, "NOW" AS "ARRIVAL_DATE".

AND 'THEN' AS 'DEPARTURE_DATE '.

, 'RT' AS 'RESV_TYPE '.

, "DPI" AS "DRI_PROP_ID".

, 'RN' AS 'RESV_NUM '.

, 'CD' AS 'CREATE_DATE.

, "MPC" AS "MC_PROPERTY_CODE".

, 'HD' AS 'HOTEL_DATE '.

'SC' AS 'SERVICE_CODE')))

AS 'RESULT '.

FROM global_name gn;

Tinfo TYPE IS TABLE OF c_info % ROWTYPE;

t_guests tinfo.

CLOB xmlDoc;

l_xmltype XMLTYPE.

v_schema_to_validate VARCHAR2 (2000);

non_registered_schema EXCEPTION;

PRAGMA EXCEPTION_INIT (non_registered_schema,-31000);

BEGIN

OPEN c_info.

Get the c_info COLLECT in BULK IN t_guests;

CLOSE C_info;

xmlDoc: = t_guests (1).result.getstringval ();

l_xmltype: = xmltype (doc);

-IF l_xmltype.isschemabased () = 0 THEN RAISE non_registered_schema;  END IF;

-v_schema_to_validate: = l_xmltype.getrootelement () | '.xsd ';

dbms_output.put_line (v_schema_to_validate);

dbms_output.put_line (xmldoc);

END;

As has been pointed out by Marco, Errors, item is imported the schema HTNG_CommonTypes.xsd.

It is based on ErrorsType of OTA_CommonTypes.xsd, whose target namespace is http://www.opentravel.org/OTA/2003/05.

This is why the Error element (declared in ErrorsType complexType) must be qualified by the prefix of the ota in the documents.

Tags: Oracle Development

Similar Questions

  • Display the error when the xml document is not valid against the schema

    Hello

    I'm using isChemaValid() in a way that, to determine if the xml document is valid against the xml schema.

    This function returns only 0 or 1, and I want to display the error and the line number if the xml is not valid.

    How can I achieve this?

    Thanks in advance,

    Elad

    Use the XMLType schemaValidate() method. It will throw an exception whose message contains the validation error.

    Get a number of 'line' is not sensible as XML is concerned.

  • Store XML in the schema issue generated tables and XML Validation against the schema.

    Hello friends,

    I am facing a problem where to store xml in a saved schema generated from tables.

    It's my diagram

    --

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xs: schema xmlns:ds = ' http://www.w3.org/2000/09/xmldsig# "" xmlns: XS = " " http://www.w3.org/2001/XMLSchema "xmlns =" " http://www.ABC.inf.in/test "targetNamespace =" " http://www.abc.inf.in/test" elementFormDefault = "qualified" attributeFormDefault = "unqualified" > "

    < xs: include schemaLocation = "abc.xsd" / >

    < xs: element name = "project" type = 'student' >

    < xs: annotation >

    < Intention > it is a Documentation < / intention >

    < / xs: annotation >

    < / xs: element >

    < / xs: Schema >

    -This is my xml document

    "< project versão ="2.00"xmlns ="http://www.abc.inf.in/test">."

    "< test xmlns ="http://www.abc.inf.in/test">."

    " < intest version ="2.00"Id ="testabc"xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "  >

    < ide >

    < cUF > 35 < / cUF >

    < cNF > 59386422 < / cNF >

    < natOp > This is post < / natOp >

    < indPag > 1 < / indPag >

    < mod > 55 < / mod >

    < set > 1 < / series >

    < / ide >...

    .....................

    Giving not complete because it is too long.

    1. I registered successfully of the schemas in the database

    2. then I generate the saved schema table

    2. in my java code I have validated the document XML schema compared and it's valid successfully.

    3 but when I recorded this XML file in the generated table there me gives error

    As:

    INSERT INTO XMLTABLE

    VALUES

    (XMLTYPE (bfilename('MYDIR','testabc.xml'), NLS_CHARSET_ID ('AL32UTF8')))

    Error report:

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    And I have to store this xml in tables of this so what I have to do?

    Thanks for your reply odie_63.

    I got this my solution for the error. My XML document is not well structured based on my registered XML schema.

    Average in My XML Document is an invalid value and which do not match my schema model so it gives this error

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    For the Solution, we have two ways

    1. I changed this literal value "94032000" in my xml file, then save it.

    2.

    -To delete this schema can

    -We need to change the schema for the particular element model

    like: -.

    -then to store xml in the database, it works...

    Thank you.

  • "The document is not valid. The index.xml file is missing.

    I suddenly can't open one of my docs of numbers. I get a msg "'name of the doc' document is not valid. The index.xml file is missing.  I literally had the open document this morning without problem, closed, tried to reopen and now I get this msg... all in the same session of the computer. It began not after an update or anything like that, right in the middle of a session of the computer.  You seem to affect all the docs of numbers.  I can't open an any of them now.  I am running OS X El Capitan Version 10.11 and numbers 09, Version 2.1.

    Hi jg,.

    The case usual this message, it is that the document has been opened in numbers version 3.xx, which converts it into a new file version that uses the file index.xml internal requested by Numbers ' 09.

    You have 3 numbers installed on your machine? This file has already been opened in this application?

    The file was saved to iCloud or opened by the iOS version numbers or numbers for iCloud?

    Recommended 'cure' is to open the file using the 3 numbers, then save as... or export to format Numbers ' 09. As a result, remember numbers to quit smoking (v3) - menu numbers > numbers to quit smoking; by clicking on the red light closed the file, but doesn't end numbers. So avoid open numbers files by double-clicking on the file itself.

    Instead, start Numbers ' 09 (v2.3) and open the file in the application.

    Kind regards

    Barry

  • I changed my Apple ID online, but it has not changed on my iPad. Now, I can not sign into the iTunes store. How can I change my Apple ID on my iPad?

    I changed my Apple ID online because the email was no longer valid. However, my ID Apple has not changed on my iPad. Now, I can not sign into the iTunes store on my iPad. How can I change the Apple ID on my iPad?

    Tap your id in settings > iTunes and App Store and tap "sign out" on the context menu and connect you then back with the version update of your account. Similarly, if you use the same account, log in and return to iCloud, FaceTime, and Messages: what to do when you have changed your Apple ID email address or password - Apple support

  • Number of unread messages not displayed against the message icon

    Product name: Iphone 5

    Storage capacity: 16 GB

    iOS 9.3.1

    Problem: Number of unread messages not displayed against the message icon. Can someone help me please.

    Already done troubleshooting: "The application of the badge icon" is running in the center of Notifications. Also restarted my phone several times

    Disconnect from the iMessage by settings - Messages - iMessage - OFF

    Disconnect from the iCloud

    Sign up for iPhone

    Do a forced reboot - after all open applications using the app Chooser - invoked by fast double pressing the home button and drag upwards on each app until it disappears from the screen.

    Meet the sleep/wake and home buttons down until you see the logo  - then release and allow normal start upward

    Sign back into it

  • Error opening a VI (LabVIEW: unable to load dynamic library due to lack of external symbols or dependencies, or a format file not valid.) The file could not be loaded)

    Hi all!

    Yesterday, I worked all day in a VI and today, unfortunately, I'm frustrated when I tried to open it. Received the following error message:

    LABVIEW: Unable to load dynamic library due to lack of external symbols or dependencies, or a format file not valid. The "ENG633 v1.vi" file could not be loaded.

    This message repeats when I try else open a Subvi.

    Step by step:

    1. I created a copy of the LabVIEW VI example: "FuzzyEx Tanks with control of PI." I kept the copy in the same original directory.

    2 - I have edited the copy, created Subvi etc.

    3 - once I finished my course of programming I closed all the cut (ctrl-x) files and copied (ctrl v) into the other folder.

    4. then I tried to open the next day and... bug! I just couldn't do

    What can I do to open/recover the VI?

    I am using 32-bit LabVIEW 2016 in a Windows 10

    I tried opening them and got the same error you did, so I them opened with a hex editor to see if there was something in the file, and there is literally nothing other than the value of 0x00 for the entire file.

  • The new XP installation error. The signature for the family Windows XP Setup is not valid. The error code is fffffc0d

    I'm doing a fresh install of Windows XP Edition family on a new hard drive.  I get the same error message indicating that the product catalog can not be installed. I reformatted and retryed with the same result. I tried a different HARD disk, but got the same trouble. I also tried installing XP Pro after a reformat and got the same error. The first error window says "the signature for the family Windows XP Setup is not valid. The error code is fffffc0d", and the second says" error: the system cannot find message for message number 0xfffffc0d text in the file for syssetup.dll fatal error messages: Setup failed to install the product catalogs. " Any directive or ideas would be greatly appreciated. THX

    Hello

    I suggest you try the steps from the link below and check if it helps.

    http://support.Microsoft.com/kb/307153

    Hope this information is useful.

  • My serial number is not valid in the new version of test?

    I bought a new laptop. Now I want to reinstall Lightroom. I downloaded the test version, but it tells me that my serial number is not valid. The old version was Lightroom 1.0, which I bought in 2007. How can I get a version of lightroom that works with my serial number?

    Your serial number work with Lightroom 1.

    Download 1.4.1 (last version of Lightroom 1) here:

    Windows: Adobe - Lightroom: For Windows: Adobe Photoshop Lightroom 1.4.1 update

    Mac: Adobe - Lightroom: for Macintosh: Adobe Photoshop Lightroom 1.4.1 update

  • ITMS-9000 ERROR: "this set is not valid. The CFBundleVersion key value...

    Hello

    I tried to submit the app store my V27 revision (1.0.5) instead of V28 (1.0.2) for Ipad 1 compatibility but I get this error:

    ITMS-9000 ERROR: "this set is not valid. The value of [3.2.4.6.88575] CFBundleVersion key in the file Info.plist must contain a newer version than the version previously downloaded [3.3.1.3.8

    How I change the CFBundleVersion?

    Thank you

    Support DPS can however help you. Please log in to your dashboard DPS https://digitalpublishing.acrobat.com/SignIn.html and you will find the coordinates at the bottom of the page

  • Can not get on the internet when you use the merge with WindowsXP

    I upgraded to Fusion 2 and am running Windows XP.  Windows XP has not check when I installed it because I wasn't getting on the internet because of all the viruses that draws windows.  Now I find that I have to check Windows after 30 days.  I can't WMWare to help me after 30 days of free support (which is a bunch of Bull).  Anyway, I tried everything that is listed in this forum and through the FAQ, the s and videos and I still can't get it to work.  Can someone help me please?

    Jim

    JudgeJim wrote:

    Problem: I can not go on the internet whenever I'm on Windows.  My Mac is not a problem with online.  When I start the merge, I agree, but when I start Windows XP, it tells me this:

    Could not open/dev/vmnet8:

    No such file or directory.

    Virtual device Ethernet0 will start disconnected

    Sometimes it will say instead of vmnet8 vmnet0

    If you have found errors like that something is not right.  Have you tried to uninstall/reinstall Fusion? Note: This is not the virtual machine at the request of Fusion.

    I tried which was published for the myers40k (adding ethernet0.virtualDEV = "e1000" to the .vmx file) but that didn't fix it when I restarted merger/Windows (the text .vmx file was closed).

    This is for Windows Vista not XP and you should not apply for bugs for Vista on XP unless you know that it is normal.  So sometimes it's better to ask to be sure before try you things are written to him in a team oriented to a specific operating system.

    I also turned off and reset the network using NAT and bridge under network settings, and from the command prompt (I'm not too comfortable with the command prompt) at the command prompt, my IP address showed this: fe80::5445 etc, but it did not show my correct IPAddress, just this list of characters.

    I have broadband with a Linksys WRT54G Router. I bypassed the router and went directly to the computer. I think it must be in the software because it did not help

    If your router does not work properly, you should be able to use Bridged to network client, but without the router online, you need to set the client to use the default NAT network.  If you change the types of networks while the guest id launched, you must release/renew the IP address.  Restart then comments does this, but there are other means and until you learn what they are just restart the guest of change so that the client is not running or suspended.

    I would start by checking the .dmg against its published MD5 sum file you have downloaded VMware to make sure that it is not corrupt.

    Uninstall/reinstall Fusion and restart the Mac.

    Start merging and then the virtual machine and it if error reports after the exact wording of the message and a screenshot if needed.

    If she has any errors and you can't even access the Internet, then you need to validate the other information requested previously or there is nothing else that I can do without checking the parameters of the information requested previously.

  • "iPhone is disabled, connect to iTunes" AND "iTunes can not connect to the iPhone because it is locked with a password" error message on the phone and the computer! Help!

    So I recently had my password wrong too many times and my iPhone 4S locked out telling me "iPhone is disabled; Connect to iTunes'. And so I connected to iTunes and decided to restore my phone. I finished the process of restoration of the configuration of my phone, but ultimately, it was not even let me in the phone! Once AGAIN he said "iPhone is disabled; " Connect " to iTunes '. However, this time, this message appeared just when I turned on my phone with a black background. I didn't scan the screen for the error message is displayed (and there was no time to be shown). When I tried to connect to iTunes again as he asked, now it says "iTunes can not connect to the iPhone because it is locked with a password".

    So now, he said "iPhone is disabled; ' Connect to iTunes' on my iPhone 4S and ''iTunes can't connect to the iPhone because it is locked with a password ' on my computer. WHAT should I do?

    As described in step 2 of "Erase your device with iTunes" in this article, you will need to use the Recovery Mode.

    Recovery mode is described in this article as well.  You may try to go into recovery mode more than once to succeed.

    If you have forgotten the password for your iPhone, iPad or iPod touch, or your device is disabled - Apple supports

  • Recently introduced an iPhone out of someone and the access code is still and I do not know Apple ID them and I can not get on the phone and do not have access to a computer so what do I do?

    Recently introduced an iPhone out of someone and the access code is still and I do not know Apple ID them and I can not get on the phone and do not have access to a computer so what do I do?

    You must contact the seller and ask him to remove this iPhone in the devices list. Otherwise, your iPhone will be a useless brick.

    Find my iPhone Activation Lock: a mechanism of extraction of the previous owner - Apple Support

  • Can not good press the mouse on the name of the file and get the option of e-mail

    Can not good press the mouse on the name of the file and get the option of e-mail

    Hello! If I understand your question, you want to right-click on a file and attach it in Mail. To do this, click on the file with two fingers on the touchpad, or control + click on the file, select 'Share', then 'mail '.

    I hope this helps!

  • Absent voice memo to the homescreen on IPhone SE there is no 'utility' or 'extras' anywhere; folder Siri is voice memo, but can not get to the home screen? How to apply for voice memo on the homescreen?

    Absent voice memo to the homescreen on IPhone SE there is no 'utility' or 'extras' anywhere; folder Siri is voice memo, but can not get to the home screen? How to apply for voice memo on the homescreen?

    Try going into settings > general > reset > reset home screen presentation.

Maybe you are looking for