Return-Path: <oracle-l-bounce@freelists.org>
X-Original-To: oracle-l@orafaq.com
Delivered-To: oracle-l@orafaq.com
Received: from turing.freelists.org (turing.freelists.org [206.53.239.180])
 by malta2546.startdedicated.com (Postfix) with ESMTPS id 0817E10031450E
 for <oracle-l@orafaq.com>; Tue,  5 May 2020 22:28:49 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2AE2123C23;
 Tue,  5 May 2020 16:28:47 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1588710527;
 bh=/yp470qMhnWNyOtWDafizoyJDylEI7P26gqSY4yOheI=;
 h=From:Sender:Sender:From;
 b=OlLs0UFOJL7CA7g8dIqHBMUpef8wx3g2tlwbzm9MUlslWJBfD3NPIXspCxyXYOnJw
	 8JSqKyRhElxexwjZOfocSPn+Ztt6W4D0zs7ZEXf4V7n5W3tFDlYHQ7RyaTE1Gwv8tQ
	 UF/0bSLUWm8kh/l39sxIUEEW5J6nfCU5Kr9HjjfY=
X-Virus-Scanned: Debian amavisd-new at turing.freelists.org
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id vKuo1sUmRSs2; Tue,  5 May 2020 16:28:46 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 5A0D52355E;
 Tue,  5 May 2020 16:27:58 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=freelists.org;
 s=turing; t=1588710522;
 bh=/yp470qMhnWNyOtWDafizoyJDylEI7P26gqSY4yOheI=;
 h=From:Sender:Sender:From;
 b=IVXEnzNj7PFSZrjV8vfpxEOI+ieeTBGBwrqqz/pZhKQscxTgo+L6u9Xo86MBa9JVA
	 0gib+i6mj4Dqx1DSyj+NoE8s7Tsjhz/7s5Z+6M7PqLUa25kqp8B2Du78RV+jJ5xyXk
	 zlGTzmgysHgqar/rsKZmpSNNm5nt+z5VmFWS9Gzw=
Received: with ECARTIS (v1.0.0; list oracle-l); Tue, 05 May 2020 16:27:13 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3DA6223303
 for <oracle-l@freelists.org>; Tue,  5 May 2020 16:27:13 -0400 (EDT)
Authentication-Results: turing.freelists.org;
 dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aDhF1CzU";
 dkim-atps=neutral
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id GveExbNaCeM9 for <oracle-l@freelists.org>;
 Tue,  5 May 2020 16:27:13 -0400 (EDT)
Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (No client certificate requested)
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id F3F19232EB
 for <oracle-l@freelists.org>; Tue,  5 May 2020 16:27:12 -0400 (EDT)
Received: by mail-vs1-f65.google.com with SMTP id e10so2121263vsp.12
        for <oracle-l@freelists.org>; Tue, 05 May 2020 13:27:12 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to:cc;
        bh=oG1OkWg1Mml+qDwZbZLDe1uo28vNhp4H1LaE4okOcMQ=;
        b=YdiRbv3ScKpeiHJcTcFfXQrIHFj85WfLPJXo+ZM2Z7copkib8Jg5EwjPbz2YuKgt7+
         fOGf+sbYgV++K0MSImhGmLQbkhcDNVOkxfxKxeDB35xvelXgfyKXeGBAqqidF7Zmj+cT
         N9am3p1WgCiIkG3+Xt3iNw90iefRMTUaGttRDeFozoJ5ssYinrCysByXZ+sktM0flxls
         U+vTrIsms9HJKUHdDPE6HgORJSMnCHB154HU3SdzIkeQLIQPeKEiczpsVWEzzGXzYQNo
         BlEeVqXUFJMStDzwsZCQOYW7NqrnrEGhT7gHQ18eJMpXSY5ajmJ+VOY3R2FTKY3yQt7s
         R/GQ==
X-Gm-Message-State: AGi0PuZM6BHUL8y8W4RDpolIkXIkHnuyDMwF/W6NGcVVTQax4R4bTw4o
 Nin2Gk8o6MrjGuJ+Di3aBQY+ZL9t/Gkseytch3C5Jj0RjKiQoA==
X-Google-Smtp-Source: APiQypIlwK0z/bB8h67nWt7iTzdo3FbOsGlR7d8GsAgmqB8MZbLlPY/yHasCc4JP8pJgmSy9myuJOoIc1uiK9U5FjQo=
X-Received: by 2002:a67:d082:: with SMTP id s2mr4387410vsi.47.1588710432234;
 Tue, 05 May 2020 13:27:12 -0700 (PDT)
MIME-Version: 1.0
References: <CAFQ5ACLqHTXutkHW4qMZ-c1XrsEiTBSrVxmJ-V2Cs8rJ0JvoYA@mail.gmail.com>
In-Reply-To: <CAFQ5ACLqHTXutkHW4qMZ-c1XrsEiTBSrVxmJ-V2Cs8rJ0JvoYA@mail.gmail.com>
From: Sayan Malakshinov <xt.and.r@gmail.com>
Date: Tue, 5 May 2020 23:26:40 +0300
Message-ID: <CAOVevU6h7Y0tHE96FtNq3OJPd-Ri-fhgTu3zGq1+=GkNN1D2pw@mail.gmail.com>
Subject: Re: XML parsing problems....
To: "Mark J. Bobak" <mark@bobak.net>
Cc: ORACLE-L <oracle-l@freelists.org>
Content-Type: multipart/alternative; boundary="000000000000f6e50305a4ec782e"
X-archive-position: 76853
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: xt.and.r@gmail.com
Precedence: normal
Reply-To: xt.and.r@gmail.com
List-Help: <mailto:ecartis@freelists.org?Subject=help>
List-Unsubscribe: <mailto:oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-Subscribe: <mailto:oracle-l-request@freelists.org?Subject=subscribe>
List-Owner: <mailto:>
List-post: <mailto:oracle-l@freelists.org>
List-Archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
--000000000000f6e50305a4ec782e
Content-Type: text/plain; charset="UTF-8"

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@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

--000000000000f6e50305a4ec782e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Mark,<div><br></div><div>In fact HTML is not fully comp=
atible with XML, that&#39;s why you get such errors.=C2=A0</div><div>For ex=
ample, to get your html answer parsed with errors you need to:</div><div>1.=
 Enclose &quot;single-tags&quot; such as &lt;br&gt;, &lt;hr&gt;, &lt;p&gt;,=
 ie &quot;&lt;p&gt;&lt;/p&gt;&quot; instead of &lt;p&gt;</div><div>=C2=A0or=
 add / to the end, ie &quot;&lt;br /&gt;&quot; instead of &quot;&lt;br&gt;&=
quot;, &lt;p /&gt; instead of &lt;p&gt;</div><div>2. XML must have add attr=
ibute value for each attribute, so=C2=A0 &quot;<span style=3D"color:rgb(51,=
51,51);font-family:Consolas,Menlo,Monaco,&quot;Lucida Console&quot;,&quot;L=
iberation Mono&quot;,&quot;DejaVu Sans Mono&quot;,&quot;Bitstream Vera Sans=
 Mono&quot;,monospace,serif;font-size:12px">&lt;HR noshade /&gt;</span>&quo=
t; is not valid xml, but &quot;<span style=3D"color:rgb(51,51,51);font-fami=
ly:Consolas,Menlo,Monaco,&quot;Lucida Console&quot;,&quot;Liberation Mono&q=
uot;,&quot;DejaVu Sans Mono&quot;,&quot;Bitstream Vera Sans Mono&quot;,mono=
space,serif;font-size:12px">&lt;HR noshade=3D&#39;1&#39;&gt;</span>&quot; i=
s valid.</div><div><br></div><div>I&#39;ve posted working fixed example her=
e:=C2=A0<a href=3D"https://gist.github.com/xtender/ff82c2909eefd481a04fac36=
57dce56a">https://gist.github.com/xtender/ff82c2909eefd481a04fac3657dce56a<=
/a></div><div>I&#39;d suggest to use real xml or at least XHTML instead of =
old html.</div><div>Btw, there are a lot of=20

 online validators

where you can check xml validity, for example:=C2=A0<a href=3D"https://www.=
xmlvalidation.com/">https://www.xmlvalidation.com/</a></div><div><br></div>=
</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">=
On Tue, May 5, 2020 at 9:58 PM Mark J. Bobak &lt;<a href=3D"mailto:mark@bob=
ak.net">mark@bobak.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex"><div dir=3D"ltr">Hi all,<br><div><br></div><div>I&#39=
;ve recently been experiencing a problem w/ XML parsing.=C2=A0 This is on O=
racle Database 19c 19.7.0.0.0 Standard Edition.</div><div><br></div><div>We=
 have a pretty complex process, but I was able to whittle it down to a simp=
le, reproducible test case.=C2=A0 (I should mention, I&#39;m *really* not a=
n XML guy, at all!)</div><div><br></div><div>Basically, it comes down to th=
is:</div><div>Simple PL/SQL function that defines a CLOB and an XMLType.=C2=
=A0 Poplate the CLOB w/ some XML, then call xmltype() function to convert t=
o and store in the XMLType column.</div><div><br></div><div>First, I ran in=
to ORA-64498=C2=A0&quot;FTP and HTTP access over XDB repository is not allo=
wed on server side&quot;.=C2=A0 I had no idea what that meant, so I opened=
=C2=A0an SR.=C2=A0 As it turns out, we are (apparnetly) getting this error =
due to the http access in the DTD.=C2=A0 So, I set event 31156 to level 2, =
to disable DTD validation.=C2=A0 That got me past the ORA-31156, but then I=
 was getting a LPX-00225: end-element tag &quot;HEAD&quot; does not match s=
tart-element tag &quot;META&quot;.=C2=A0 Well, upon closer examination, sur=
e enough, I was missing a &#39;&lt;/META&gt;&#39; tag.=C2=A0 I added that i=
n, and now I have a LPX-00210: expected &#39;=3D&#39; instead of &#39;s&#39=
;.=C2=A0 I have no idea what this error means or how to fix it.</div><div><=
br></div><div>Any insights would be greatly appreciated.</div><div><br></di=
v><div>-Mark</div><div>PS=C2=A0 Full sample test case is available at:=C2=
=A0=C2=A0<a href=3D"https://pastebin.com/qji72gmz" target=3D"_blank">https:=
//pastebin.com/qji72gmz</a></div></div>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div>Best=
 regards,<br>Sayan Malakshinov</div><span style=3D"font-size:13.6px">Oracle=
 performance tuning engineer</span><br style=3D"font-size:13.6px"><div>Orac=
le ACE Associate<br><a href=3D"http://orasql.org" target=3D"_blank">http://=
orasql.org</a></div></div></div></div></div>

--000000000000f6e50305a4ec782e--
--
http://www.freelists.org/webpage/oracle-l


