findNode() and xmlns namespaces

This forum is for general support of Xbase++
Post Reply
Message
Author
Piotr D
Posts: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

findNode() and xmlns namespaces

#1 Post 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

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: findNode() and xmlns namespaces

#2 Post 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.
The eXpress train is coming - and it has more cars.

Piotr D
Posts: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: findNode() and xmlns namespaces

#3 Post by Piotr D »

Thanks, Roger. I'll wait :)
Piotr

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: findNode() and xmlns namespaces

#4 Post by rdonnay »

Here is the latest source.
Attachments
_dcxml.zip
(5.87 KiB) Downloaded 915 times
The eXpress train is coming - and it has more cars.

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: findNode() and xmlns namespaces

#5 Post by hz_scotty »

Need ASXML10.LIB ! to compile (#pragma library)
Where can i get it?
or can i remark it?
best regards
Hans

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: findNode() and xmlns namespaces

#6 Post 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.
The eXpress train is coming - and it has more cars.

Post Reply