Re: [xml] xmlgetNodePath differences on Mac/Win32.



On Sat, Nov 10, 2007 at 03:47:30PM +1100, Andrew Nelson wrote:
Dear list,
I am statically compiling libxml into a plugin/dll on both Mac  
(Tiger) and Win32 (XP ProSP2).

I am using binary versions libxml2-2.6.30 (iconv-1.9.2 + zlib-1.2.3)  
on the Win32 platform and libxml2.2.dylib on the Mac.
I am then using a modification of the tree1.c example to print out a  
recursive list of all the node paths in the XML file.

<fragment>

     for (cur_node = a_node; cur_node ; cur_node = cur_node->next) {
         if (cur_node->type == XML_ELEMENT_NODE) {
                      path = xmlGetNodePath(cur_node);

</fragment>

However, the xmlChar string from xmlGetNodePath() on Win32 and Mac is  
different!  On Mac I get something like:

/xrdMeasurements
/xrdMeasurements/comment
/xrdMeasurements/comment/entry

on Win32 I get

/*
/*/*[1]
/*/*[1]/*

For me the second is useless, is there something I have forgotten to  
do on win32?  Or can anyone suggest code to get the same results I  
get on the Mac?

  on the Windows version you used a different document with a default
namespace. Your test is bogus,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]