Re: [swift-corelibs-dev] NSXMLNode and Friends

2016-01-04 Thread Robert Stephen Thompson via swift-corelibs-dev
Ok, after trying to get this building on Linux, I have discovered what you mean. I have gotten it building successfully on Linux, unfortunately this required changes to build settings in other modules, because /usr/include/libxml2 wasn’t being added to the search locations. And this then result

Re: [swift-corelibs-dev] NSXMLNode and Friends

2015-12-18 Thread Philippe Hausler via swift-corelibs-dev
Dealing with the cross platform part of the module map portion may be a bit tricky; I had to use some of libxml2 for CFXMLInterface it is effectively a simple wrapper around a few xml c calls that are a bit swift-friendlier. Perhaps that might make some of that integration easier. However if you

Re: [swift-corelibs-dev] NSXMLNode and Friends

2015-12-18 Thread Robert Stephen Thompson via swift-corelibs-dev
Ok, sounds good to me. I have quite a bit done at this point, but it’s not “pretty enough” for a real PR yet. If people really want to look at the ugliness, https://github.com/rothomp3/swift-corelibs-foundation/tree/feature/NSXMLDocument is where it lives. Thanks, Robert > On Dec 18, 2015, at

Re: [swift-corelibs-dev] NSXMLNode and Friends

2015-12-18 Thread Tony Parker via swift-corelibs-dev
Hi Robert, There actually already is some discussion on the swift-evolution list about a language feature to enable factory methods, which would help us to implement these kinds of things. It is a common pattern in Foundation to return subclasses from initializers (NSNull, NSPredicate are in th

[swift-corelibs-dev] NSXMLNode and Friends

2015-12-18 Thread Robert Stephen Thompson via swift-corelibs-dev
Since I recently did a small implementation of NSXMLNode and NSXMLDocument to use in an iOS project, I decided to tackle doing the full-featured one here. It’s not that hard, doing it as a wrapper on libxml2, except I’ve run into a bit of a snag with making the semantics exactly match Darwin Fou