Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6045325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:06:44+00:00 2026-05-23T07:06:44+00:00

I’m going to validate and process XML provided by a third party. The XML

  • 0

I’m going to validate and process XML provided by a third party. The XML conforms a standardized XML schema also provided by a third party.

For validation I use DBMS_XMLSCHEMA essentially this way:

-- pseudocode follows
declare
  xmldoc xmltype;
begin
  dbms_xmlschema.registerschema(schemaurl => name,
                                schemadoc => xmltype(schema),
                                local => true,
                                gentypes => false,
                                gentables => false
                                );
  xmldoc := xmltype(xml).createSchemaBasedXML(schema_name);
  xmldoc.schemavalidate;
end;

Validation seems to work except that I’ve run an issue with XML schema type xs:dateTime that is demonstrated below.

With XML schema:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="datetime-issue">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="time" type="xs:dateTime" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

The validation of following XML:

<?xml version="1.0" encoding="UTF-8"?>
<datetime-issue>
  <time>2011-06-15T16:58:23</time>
  <!-- Oracle doesn't like timezone ? -->
  <time>2011-06-15T16:58:23+02:00</time>
  <time>2011-06-16T09:55:01</time>
</datetime-issue>

Fails unexpectedly on the second time-element:

ORA-30992: error occurred at Xpath /datetime-issue/time[2]
ORA-01830: date format picture ends before converting entire input string
ORA-06512: at "SYS.XMLTYPE", line 354

AFAICS 2011-06-15T16:58:23+02:00 should be a valid XML schema xs:dateTime value and DBMS_XMLSCHEMA should not complain about that at all. Validation should also be independent on any database date format settings, right ?

So is this an Oracle quirk and if yes what are the workarounds ? Or should I configure Oracle and/or DBMS_XMLSCHEMA differently ? Or have I misinterpreted something or …

I’m running Oracle Database 11g Release 11.2.0.1.0.

If it’s worth of anything the example XML schema and data above validates correctly with exchangerxml that uses Xerces.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:06:44+00:00Added an answer on May 23, 2026 at 7:06 am

    I think you can fix that by adding:

    xdb:SQLType="TIMESTAMP WITH TIME ZONE"
    

    to the element in the XML schema. Though that may error on the non-timezone records…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm parsing an XML file, the creators of it stuck in a bunch social
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.