thomasdenney / objectivegumbo Goto Github PK
View Code? Open in Web Editor NEWAn Objective-C wrapper with utility functions around Gumbo for easy HTML5 parsing in Cocoa and Cocoa Touch
An Objective-C wrapper with utility functions around Gumbo for easy HTML5 parsing in Cocoa and Cocoa Touch
By using KVC it would allow the accessing of attributes and child elements through code such as:
NSString * link = element.[@"href"];
NSArray * subelement = element[@".hello"];
Rather than:
NSString * link = element.attributes[@"href"];
NSArray * subelement = [element elementsWithClass:@"hello"];
This would also be a very easy and quick way to begin to introduce jQuery/CSS selectors into the framework.
Would it be hard?
Thanks!
I can get the text easily enough, but I cannot figure out a way to get the raw underlying html from an OGElement? Is that possible at the moment?
XCode fails to compile OGElement.h header because class and id are reserved keywords.
Here is screenshot of failure.
https://www.dropbox.com/s/9nr5okpicu18o5q/%D0%A1%D0%BA%D1%80%D0%B8%D0%BD%D1%88%D0%BE%D1%82%202015-04-16%2012.27.27.png?dl=0
Could you please change parameters name to elementClass and elementId (like in .m file) and upload new cocoa pod? Might be it's better to change parameter of elementsWithTag: to elementTag to keep pattern.
Thanks in advance,
Vadim
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.