1

Topic: Error at

Why that at  does not find a required tag?

declare
l_clob clob;
OrganizationName varchar2 (30);
begin
l_clob: = ' <? xml version = "1.0" encoding = "UTF-8"?>
<Envelope>
<Body>
<qfscrl:QFSC xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0" xmlns:qfscrl = "urn:customers.ru:Information:SQDocuments:QFSC:5.9.0">
<qfscrl:Exporter xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0">
<cat_ru:OrganizationName xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0"> 456 </cat_ru:OrganizationName>
</qfscrl:Exporter>
</qfscrl:QFSC>
</Body>
</Envelope> ';
select OrganizationName
into OrganizationName
from xmltable (
xmlnamespaces (
' http://schemas.xmlsoap.org/soap/qfscrl/ ' as "qfscrl"
, ' http://schemas.xmlsoap.org/soap/cat_ru/ ' as "cat_ru"
, default ' http://www.fu.gov.si/'
)
, ' /Envelope/Body/qfscrl:QFSC/qfscrl:Exporter'
passing xmlparse (document l_clob)
columns OrganizationName varchar2 (30) path ' OrganizationName'
) ;
dbms_output.put_line (OrganizationName);
end;
/

2

Re: Error at

Because you invented namespace and did not specify it in a column.

3

Re: Error at

namespace does not influence.

declare
l_clob clob;
OrganizationName varchar2 (30);
begin
l_clob: = ' <? xml version = "1.0" encoding = "UTF-8"?>
<Envelope>
<Body>
<QFSC>
<Exporter>
<OrganizationName> 456 </OrganizationName>
</Exporter>
</QFSC>
</Body>
</Envelope> ';
select OrganizationName into OrganizationName
from xmltable (
xmlnamespaces (
' http://schemas.xmlsoap.org/soap/envelope/ ' as "env"
, default ' http://www.fu.gov.si/'
)
, '/Envelope/Body/QFSC/Exporter'
passing xmlparse (document l_clob)
columns OrganizationName varchar2 (30) path ' OrganizationName'
) ;
dbms_output.put_line (OrganizationName);
end;
/

4

Re: Error at

Wisky wrote:

namespace does not influence.

the Odd fellow, not . Remove  default.

5

Re: Error at

Elic wrote:

the Odd fellow, not . Remove  default.

Thanks, are valid at removal default all work.
But how to fill active namespace

declare
l_clob clob;
OrganizationName varchar2 (30);
begin
l_clob: = ' <? xml version = "1.0" encoding = "UTF-8"?>
<Envelope>
<Body>
<qfscrl:QFSC xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0" xmlns:qfscrl = "urn:customers.ru:Information:SQDocuments:QFSC:5.9.0">
<qfscrl:Exporter xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0">
<cat_ru:OrganizationName xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0"> 456 </cat_ru:OrganizationName>
</qfscrl:Exporter>
</qfscrl:QFSC>
</Body>
</Envelope> ';
select OrganizationName
into OrganizationName
from xmltable (
xmlnamespaces (
' http://XXXXX/ ' as "qfscrl"
, ' http://XXXXX/ ' as "cat_ru"
)
, ' /Envelope/Body/qfscrl:QFSC/qfscrl:Exporter'
passing xmlparse (document l_clob)
columns OrganizationName varchar2 (30) path ' OrganizationName'
) ;
dbms_output.put_line (OrganizationName);
end;
/

6

Re: Error at

Wisky wrote:

But how to fill active namespace

Not at random. [spoiler]

Wisky wrote:

declare
l_clob clob;
OrganizationName varchar2 (30);
begin
l_clob: = ' <? xml version = "1.0" encoding = "UTF-8"?>
<Envelope>
<Body>
<qfscrl:QFSC xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0" xmlns:>>> qfscrl <<<= ">>>urn:customers.ru:Information:SQDocuments:QFSC:5.9.0<<<">
<qfscrl:Exporter xmlns:>>> cat_ru <<<= ">>>urn:customers.ru:CommonAggregateTypes:5.8.0<<<">
<cat_ru:OrganizationName xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0"> 456 </cat_ru:OrganizationName>
</qfscrl:Exporter>
</qfscrl:QFSC>
</Body>
</Envelope> ';

[/spoiler]

7

Re: Error at

Elic, thanks once again.
In columns forgot ' cat_ru:OrganizationName '.
I will go on w3.org to read, but there English very heavy.

8

Re: Error at

SQL>
select OrganizationName
from xmltable (
xmlnamespaces (
' >>>urn:customers.ru:Information:SQDocuments:QFSC:5.9.0<<< ' as "MyNameSpace1Alias"
, ' >>>urn:customers.ru:CommonAggregateTypes:5.8.0<<< ' as "MyFavoriteNamespace2"
)
, ' /Envelope/Body/>>>MyNameSpace1Alias<<<:QFSC/MyNameSpace1Alias:Exporter'
passing xmltype (' <? xml version = "1.0" encoding = "UTF-8"?>
<Envelope>
<Body>
<qfscrl:QFSC xmlns:cat_ru = ">>>urn:customers.ru:CommonAggregateTypes:5.8.0<<<" xmlns:qfscrl = ">>>urn:customers.ru:Information:SQDocuments:QFSC:5.9.0<<<">
<qfscrl:Exporter xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0">
<cat_ru:OrganizationName xmlns:cat_ru = "urn:customers.ru:CommonAggregateTypes:5.8.0"> 456 </cat_ru:OrganizationName>
</qfscrl:Exporter>
</qfscrl:QFSC>
</Body>
</Envelope> ')
columns OrganizationName varchar2 (30) path ' >>>MyFavoriteNamespace2<<<:OrganizationName'
) ;
ORGANIZATIONNAME
------------------------------
456
SQL>