NSXMLDocument

View: New views
9 Messages — Rating Filter:   Alert me  

NSXMLDocument

by Michael C. Silva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there anyone working on an implementation of the NSXMLDocument  
class?  I need this object to port a project and would be willing to  
help out.

Thanks,
Mike




_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Fred Kiefer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Michael C. Silva wrote:
> Is there anyone working on an implementation of the NSXMLDocument
> class?  I need this object to port a project and would be willing to
> help out.
>

Not NSXMLDocument, but some of the releated classes can be found in
mySTEP. And as Nikolaus Schaller freely shares his code with GNUstep is
would be possible to move that over and extend the implementation.
Ihaven't had a look at that code myself, so I don't know whether it
actually helps for these classes.

The source code of mySTEP can be found at
http://www.quantum-step.com/download/sources/ currently the latest
release is mySTEP-src-2.5B1064.tgz and it includes a lot of stuff you
don't need, but this is the only way Nikolaus makes his code available.

Fred


_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Richard Frith-Macdonald-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 7 Feb 2009, at 16:22, Fred Kiefer wrote:

> Michael C. Silva wrote:
>> Is there anyone working on an implementation of the NSXMLDocument
>> class?  I need this object to port a project and would be willing to
>> help out.
>>
>
> Not NSXMLDocument, but some of the releated classes can be found in
> mySTEP. And as Nikolaus Schaller freely shares his code with GNUstep  
> is
> would be possible to move that over and extend the implementation.
> Ihaven't had a look at that code myself, so I don't know whether it
> actually helps for these classes.
>
> The source code of mySTEP can be found at
> http://www.quantum-step.com/download/sources/ currently the latest
> release is mySTEP-src-2.5B1064.tgz and it includes a lot of stuff you
> don't need, but this is the only way Nikolaus makes his code  
> available.

I have some code I wrote late last year that I haven't committed to  
the base libaray ... just the headers and largely non-functional  
skeletons of the implementation, but even so that's a little more  
advanced than currently in mySTEP.

I stopped doing anything with it when it became apparent to me from  
the desgin of the API, that Apples new classes are actually a wrapper  
round libxml2 ... and we already have a wrapper round libxml2 in  
GSXML.m in the base library.  So I couldn't decide what to do:
We could implement a second wrapper around libxml2 following Apple's  
API and implementation details as closely as we can, or we could try  
implementing a pure Objective-C version of the Apple API.  The first  
approach is kind of redundant .. as we already have GSXML.  The second  
approach involves a lot of work that I don't really have time for.

Our API is obviously different to Apples, but it's functionally  
similar (since both wrap libxml2) and might well be close enough to  
use in a port of the application.
On the other hand, if the application only makes limited use of  
NSXMLDocument, it might be feasible to implement a pure objective-c  
version of the class with the functionality needed for the port.
I suppose though, that implementing it the same way that Apple did  
maybe easiest, even if it does mean we have an uglier API than necessary




_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Nicola Pero-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 6 Feb 2009, at 03:22, Michael C. Silva wrote:

> Is there anyone working on an implementation of the NSXMLDocument  
> class?  I need this object to port a project and would be willing to  
> help out.

There is a set of GSXML classes in gnustep-base that are extremely  
similar to the NSXML ones you need. ;-)

You could implement the NSXML classes by just reusing the code from  
GSXML ... and adapting it to have the
NSXML API.  Don't forget to send your code back to us so we can  
include it in gnustep-base! :-)

Thanks


_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Nicola Pero-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I stopped doing anything with it when it became apparent to me from  
> the desgin of the API, that Apples new classes are actually a  
> wrapper round libxml2 ... and we already have a wrapper round  
> libxml2 in GSXML.m in the base library.  So I couldn't decide what  
> to do:
> We could implement a second wrapper around libxml2 following Apple's  
> API and implementation details as closely as we can,

I (personally) vote for this option.  Maybe we could even remove GSXML  
at some point. ;-)

Eg, Renaissance has separate XML parsing code for GNUstep and Apple.  
It would be nice to have been able to use a single API
across the two. :-)

Getting rid of libxml2 and going for the pure Objective-C route sounds  
like a big job ... for little gain, so I don't think it would
be very useful.

Thanks


_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Michael C. Silva :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks everyone.  I'll investigate the GSXML and see if there's a  
reasonable path to an NSXMLDocument 'wrapper' as suggested.

If I go down this path I'll keep you all updated on the progress so  
the code can hopefully be folded back into the project.

Mike


On Feb 8, 2009, at 5:30 PM, Nicola Pero wrote:

>> I stopped doing anything with it when it became apparent to me from  
>> the desgin of the API, that Apples new classes are actually a  
>> wrapper round libxml2 ... and we already have a wrapper round  
>> libxml2 in GSXML.m in the base library.  So I couldn't decide what  
>> to do:
>> We could implement a second wrapper around libxml2 following  
>> Apple's API and implementation details as closely as we can,
>
> I (personally) vote for this option.  Maybe we could even remove  
> GSXML at some point. ;-)
>
> Eg, Renaissance has separate XML parsing code for GNUstep and  
> Apple.  It would be nice to have been able to use a single API
> across the two. :-)
>
> Getting rid of libxml2 and going for the pure Objective-C route  
> sounds like a big job ... for little gain, so I don't think it would
> be very useful.
>
> Thanks

Statement of Confidentiality
The contents of this e-mail message and any attachments are  
confidential and are intended solely for the addressee. The  
information may also be legally privileged. This transmission is sent  
in trust, and the sole purpose of delivery to the intended recipient.  
If you have received this transmission in error, any use, reproduction  
or dissemination of this transmission is strictly prohibited. If you  
are not the intended recipient, please immediately notify the sender  
by reply e-mail or at 508-683-2500 and delete this message and its  
attachments, if any.



_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Fred Kiefer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nicola Pero wrote:
>> I stopped doing anything with it when it became apparent to me from
>> the desgin of the API, that Apples new classes are actually a wrapper
>> round libxml2 ... and we already have a wrapper round libxml2 in
>> GSXML.m in the base library.  So I couldn't decide what to do:
>> We could implement a second wrapper around libxml2 following Apple's
>> API and implementation details as closely as we can,
>
> I (personally) vote for this option.  Maybe we could even remove GSXML
> at some point. ;-)

Sounds sensible to me. Richard, could you please submit your current
code, then we all have something to start on.





_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Re: NSXMLDocument

by Richard Frith-Macdonald-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 9 Feb 2009, at 10:03, Fred Kiefer wrote:

> Nicola Pero wrote:
>>> I stopped doing anything with it when it became apparent to me from
>>> the desgin of the API, that Apples new classes are actually a  
>>> wrapper
>>> round libxml2 ... and we already have a wrapper round libxml2 in
>>> GSXML.m in the base library.  So I couldn't decide what to do:
>>> We could implement a second wrapper around libxml2 following Apple's
>>> API and implementation details as closely as we can,
>>
>> I (personally) vote for this option.  Maybe we could even remove  
>> GSXML
>> at some point. ;-)
>
> Sounds sensible to me. Richard, could you please submit your current
> code, then we all have something to start on.

OK ... I committed the skeletons of the classes to subversion (after  
checking that it would at least all compile without errors, even  
though none of it works of course).
I also added a new NSXMLPrivate.h header for internal use by all the  
NSXML... files, it includes all the headers they need, and in  
particular has the libxml/libxslt header includes copied from GSXML.m  
so it should be easy to start implementing NSXMLNode.m as a wrapper  
round libxml2.



_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep

Parent Message unknown Re: NSXMLDocument

by hns@computer.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I have some code I wrote late last year that I haven't committed to  
> the base libaray ... just the headers and largely non-functional  
> skeletons of the implementation, but even so that's a little more  
> advanced than currently in mySTEP.

The latest state is that simple XML files (without DTD, Namespaces and
Entities) are parsed. Code (pure OBJ-C version) is not yet in

http://www.quantum-step.com/download/sources/

but will be with the next release (in the next days).

But I have seen that the GNUstep implementation shall become a wrapper
for libxml2 so my code can't be used anyway (since it does not relate
to libxml2).
Nevertheless it could be interesting for GNUstep to study how the
@implementation does some tricks.

Nikolaus

BTW: parsing is a quite simple approach by using NSXMLParser and its
setDelegate: method and adding approx. 5 delegate methods to NSXMLNode.
_______________________________________________
Help-gnustep mailing list
Help-gnustep@...
http://lists.gnu.org/mailman/listinfo/help-gnustep