Page 1 of 1

findNode() and xmlns namespaces

Posted: Sat Nov 19, 2016 1:26 pm
by Piotr D
Hi,
in XML files I can define namespace like:
xmlns:tns="http://........"
Then in xml file the tag look like:
<tns:SampleNode></tns:SampleNode>

Problem is, that in some XML files, programmers change prefix for namespaces. File:

<?xml version="1.0" encoding="UTF-8"?>
<Deklaracja xmlns="http://crd.gov.pl/wzor/2011/">
<Naglowek>
<WariantFormularza>19</WariantFormularza>
<Rok>2011</Rok>
<KodUrzedu>3023</KodUrzedu>
</Naglowek>
</Deklaracja>

and file:
<?xml version="1.0" encoding="UTF-8"?>
<tns:Deklaracja xmlns:tns="http://crd.gov.pl/wzor/2011/">
<tns:Naglowek>
<tns:WariantFormularza>19</tns:WariantFormularza>
<tns:Rok>2011</tns:Rok>
<tns:KodUrzedu>3023</tns:KodUrzedu>
</tns:Naglowek>
</tns:Deklaracja>

are valid with the same XSD schema. But the findNode() search the tag complete with prefix. Searching findNode('Naglowek') in first file have succes, but in second - no. How solve this problem?

Piotr

Re: findNode() and xmlns namespaces

Posted: Sat Nov 19, 2016 2:28 pm
by rdonnay
I have fixed this problem in build 265. I will send you source for _dcxml.prg when I return home on 2 days.

Re: findNode() and xmlns namespaces

Posted: Sun Nov 20, 2016 12:51 am
by Piotr D
Thanks, Roger. I'll wait :)
Piotr

Re: findNode() and xmlns namespaces

Posted: Sun Nov 20, 2016 11:42 am
by rdonnay
Here is the latest source.

Re: findNode() and xmlns namespaces

Posted: Mon Nov 21, 2016 2:38 pm
by hz_scotty
Need ASXML10.LIB ! to compile (#pragma library)
Where can i get it?
or can i remark it?

Re: findNode() and xmlns namespaces

Posted: Tue Nov 22, 2016 8:36 am
by rdonnay
The eXpress++ DCXML.DLL can only be used with the Xbase++ Professional subscription. It makes calls to the Xbase++ XML library functions in ASXML10.LIB and ASXML10.DLL.