Re: XML parsing problems....

From: Mark J. Bobak <mark_at_bobak.net>
Date: Tue, 5 May 2020 17:36:51 -0400
Message-ID: <CAFQ5AC+pzUXB2fUn7APz6ufjvGXBN5xtkUs8ZuWtDW5o1uMbvA_at_mail.gmail.com>



Thanks Sayan, I'll check out your example and forward your points to our developers!

-Mark

On Tue, May 5, 2020 at 4:27 PM Sayan Malakshinov <xt.and.r_at_gmail.com> wrote:

> Hi Mark,
>
> In fact HTML is not fully compatible with XML, that's why you get such
> errors.
> For example, to get your html answer parsed with errors you need to:
> 1. Enclose "single-tags" such as <br>, <hr>, <p>, ie "<p></p>" instead of
> <p>
> or add / to the end, ie "<br />" instead of "<br>", <p /> instead of <p>
> 2. XML must have add attribute value for each attribute, so "<HR noshade
> />" is not valid xml, but "<HR noshade='1'>" is valid.
>
> I've posted working fixed example here:
> https://gist.github.com/xtender/ff82c2909eefd481a04fac3657dce56a
> I'd suggest to use real xml or at least XHTML instead of old html.
> Btw, there are a lot of online validators where you can check xml
> validity, for example: https://www.xmlvalidation.com/
>
>
> On Tue, May 5, 2020 at 9:58 PM Mark J. Bobak <mark_at_bobak.net> wrote:
>
>> Hi all,
>>
>> I've recently been experiencing a problem w/ XML parsing. This is on
>> Oracle Database 19c 19.7.0.0.0 Standard Edition.
>>
>> We have a pretty complex process, but I was able to whittle it down to a
>> simple, reproducible test case. (I should mention, I'm *really* not an XML
>> guy, at all!)
>>
>> Basically, it comes down to this:
>> Simple PL/SQL function that defines a CLOB and an XMLType. Poplate the
>> CLOB w/ some XML, then call xmltype() function to convert to and store in
>> the XMLType column.
>>
>> First, I ran into ORA-64498 "FTP and HTTP access over XDB repository is
>> not allowed on server side". I had no idea what that meant, so I opened an
>> SR. As it turns out, we are (apparnetly) getting this error due to the
>> http access in the DTD. So, I set event 31156 to level 2, to disable DTD
>> validation. That got me past the ORA-31156, but then I was getting a
>> LPX-00225: end-element tag "HEAD" does not match start-element tag "META".
>> Well, upon closer examination, sure enough, I was missing a '</META>' tag.
>> I added that in, and now I have a LPX-00210: expected '=' instead of 's'.
>> I have no idea what this error means or how to fix it.
>>
>> Any insights would be greatly appreciated.
>>
>> -Mark
>> PS Full sample test case is available at: https://pastebin.com/qji72gmz
>>
>
>
> --
> Best regards,
> Sayan Malakshinov
> Oracle performance tuning engineer
> Oracle ACE Associate
> http://orasql.org
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue May 05 2020 - 23:36:51 CEST

Original text of this message