wakizashi 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. data/.gitignore +8 -0
  2. data/Gemfile +4 -0
  3. data/README.md +54 -0
  4. data/Rakefile +24 -0
  5. data/app/app_delegate.rb +9 -0
  6. data/lib/wakizashi/base.rb +13 -0
  7. data/lib/wakizashi/version.rb +3 -0
  8. data/lib/wakizashi/xml_document.rb +148 -0
  9. data/lib/wakizashi/xml_element.rb +45 -0
  10. data/lib/wakizashi/xml_node.rb +5 -0
  11. data/lib/wakizashi.rb +15 -0
  12. data/spec/wakizashi_spec.rb +28 -0
  13. data/spec/xml_document_spec.rb +24 -0
  14. data/spec/xml_element_spec.rb +16 -0
  15. data/spec/xml_node_spec.rb +2 -0
  16. data/vendor/Podfile.lock +5 -0
  17. data/vendor/Pods/GDataXML-HTML/.gitignore +13 -0
  18. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML-HTML-Info.plist +38 -0
  19. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML-HTML-Prefix.pch +14 -0
  20. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML_HTMLAppDelegate.h +28 -0
  21. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML_HTMLAppDelegate.m +82 -0
  22. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML_HTMLViewController.h +29 -0
  23. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/GDataXML_HTMLViewController.m +89 -0
  24. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/en.lproj/GDataXML_HTMLViewController.xib +351 -0
  25. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/en.lproj/InfoPlist.strings +2 -0
  26. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/en.lproj/MainWindow.xib +444 -0
  27. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/html.html +34 -0
  28. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/lib/GDataXMLNode.h +229 -0
  29. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/lib/GDataXMLNode.m +1910 -0
  30. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/main.m +24 -0
  31. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML/xml.xml +15 -0
  32. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML.xcodeproj/project.pbxproj +317 -0
  33. data/vendor/Pods/GDataXML-HTML/GDataXML-HTML.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  34. data/vendor/Pods/GDataXML-HTML/README.markdown +55 -0
  35. data/vendor/Pods/Headers/GDataXML-HTML/GDataXMLNode.h +229 -0
  36. data/vendor/Pods/Pods-prefix.pch +3 -0
  37. data/vendor/Pods/Pods-resources.sh +15 -0
  38. data/vendor/Pods/Pods.bridgesupport +231 -0
  39. data/vendor/Pods/Pods.xcconfig +4 -0
  40. data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
  41. data/wakizashi.gemspec +18 -0
  42. metadata +124 -0
@@ -0,0 +1,24 @@
1
+ /* Copyright (c) 2011 Simon Grätzer simon@graetzer.org
2
+
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ #import <UIKit/UIKit.h>
17
+
18
+ int main(int argc, char *argv[])
19
+ {
20
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
21
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
22
+ [pool release];
23
+ return retVal;
24
+ }
@@ -0,0 +1,15 @@
1
+ <company name="BIGCompany">
2
+ <department name="IT-Department">
3
+ <employees>
4
+ <employe>Phillip</employe>
5
+ <employe>Michael</employe>
6
+ </employees>
7
+ </department>
8
+
9
+ <department name="Sales">
10
+ <employees>
11
+ <employe>Simon</employe>
12
+ <employe>Peter</employe>
13
+ </employees>
14
+ </department>
15
+ </company>
@@ -0,0 +1,317 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ F43A13C813CF10F300FD689C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F43A13C713CF10F300FD689C /* UIKit.framework */; };
11
+ F43A13CA13CF10F300FD689C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F43A13C913CF10F300FD689C /* Foundation.framework */; };
12
+ F43A13CC13CF10F300FD689C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F43A13CB13CF10F300FD689C /* CoreGraphics.framework */; };
13
+ F43A13D213CF10F300FD689C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F43A13D013CF10F300FD689C /* InfoPlist.strings */; };
14
+ F43A13D513CF10F300FD689C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F43A13D413CF10F300FD689C /* main.m */; };
15
+ F43A13D813CF10F300FD689C /* GDataXML_HTMLAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F43A13D713CF10F300FD689C /* GDataXML_HTMLAppDelegate.m */; };
16
+ F43A13DB13CF10F300FD689C /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = F43A13D913CF10F300FD689C /* MainWindow.xib */; };
17
+ F43A13DE13CF10F300FD689C /* GDataXML_HTMLViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F43A13DD13CF10F300FD689C /* GDataXML_HTMLViewController.m */; };
18
+ F43A13E113CF10F300FD689C /* GDataXML_HTMLViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F43A13DF13CF10F300FD689C /* GDataXML_HTMLViewController.xib */; };
19
+ F4E0EDE313CF3A2F000E7B3B /* GDataXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = F4E0EDE213CF3A2F000E7B3B /* GDataXMLNode.m */; };
20
+ F4E0EDE613CF7A37000E7B3B /* xml.xml in Resources */ = {isa = PBXBuildFile; fileRef = F4E0EDE513CF7A37000E7B3B /* xml.xml */; };
21
+ F4E0EDE813CF7C31000E7B3B /* html.html in Resources */ = {isa = PBXBuildFile; fileRef = F4E0EDE713CF7C31000E7B3B /* html.html */; };
22
+ /* End PBXBuildFile section */
23
+
24
+ /* Begin PBXFileReference section */
25
+ F43A13C313CF10F300FD689C /* GDataXML-HTML.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GDataXML-HTML.app"; sourceTree = BUILT_PRODUCTS_DIR; };
26
+ F43A13C713CF10F300FD689C /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
27
+ F43A13C913CF10F300FD689C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
28
+ F43A13CB13CF10F300FD689C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29
+ F43A13CF13CF10F300FD689C /* GDataXML-HTML-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GDataXML-HTML-Info.plist"; sourceTree = "<group>"; };
30
+ F43A13D113CF10F300FD689C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
31
+ F43A13D313CF10F300FD689C /* GDataXML-HTML-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GDataXML-HTML-Prefix.pch"; sourceTree = "<group>"; };
32
+ F43A13D413CF10F300FD689C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
33
+ F43A13D613CF10F300FD689C /* GDataXML_HTMLAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDataXML_HTMLAppDelegate.h; sourceTree = "<group>"; };
34
+ F43A13D713CF10F300FD689C /* GDataXML_HTMLAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GDataXML_HTMLAppDelegate.m; sourceTree = "<group>"; };
35
+ F43A13DA13CF10F300FD689C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = "<group>"; };
36
+ F43A13DC13CF10F300FD689C /* GDataXML_HTMLViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDataXML_HTMLViewController.h; sourceTree = "<group>"; };
37
+ F43A13DD13CF10F300FD689C /* GDataXML_HTMLViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GDataXML_HTMLViewController.m; sourceTree = "<group>"; };
38
+ F43A13E013CF10F300FD689C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/GDataXML_HTMLViewController.xib; sourceTree = "<group>"; };
39
+ F4E0EDE113CF3A2F000E7B3B /* GDataXMLNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDataXMLNode.h; sourceTree = "<group>"; };
40
+ F4E0EDE213CF3A2F000E7B3B /* GDataXMLNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GDataXMLNode.m; sourceTree = "<group>"; };
41
+ F4E0EDE513CF7A37000E7B3B /* xml.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = xml.xml; sourceTree = "<group>"; };
42
+ F4E0EDE713CF7C31000E7B3B /* html.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = html.html; sourceTree = "<group>"; };
43
+ /* End PBXFileReference section */
44
+
45
+ /* Begin PBXFrameworksBuildPhase section */
46
+ F43A13C013CF10F300FD689C /* Frameworks */ = {
47
+ isa = PBXFrameworksBuildPhase;
48
+ buildActionMask = 2147483647;
49
+ files = (
50
+ F43A13C813CF10F300FD689C /* UIKit.framework in Frameworks */,
51
+ F43A13CA13CF10F300FD689C /* Foundation.framework in Frameworks */,
52
+ F43A13CC13CF10F300FD689C /* CoreGraphics.framework in Frameworks */,
53
+ );
54
+ runOnlyForDeploymentPostprocessing = 0;
55
+ };
56
+ /* End PBXFrameworksBuildPhase section */
57
+
58
+ /* Begin PBXGroup section */
59
+ F43A13B813CF10F200FD689C = {
60
+ isa = PBXGroup;
61
+ children = (
62
+ F43A13CD13CF10F300FD689C /* GDataXML-HTML */,
63
+ F43A13C613CF10F300FD689C /* Frameworks */,
64
+ F43A13C413CF10F300FD689C /* Products */,
65
+ );
66
+ sourceTree = "<group>";
67
+ };
68
+ F43A13C413CF10F300FD689C /* Products */ = {
69
+ isa = PBXGroup;
70
+ children = (
71
+ F43A13C313CF10F300FD689C /* GDataXML-HTML.app */,
72
+ );
73
+ name = Products;
74
+ sourceTree = "<group>";
75
+ };
76
+ F43A13C613CF10F300FD689C /* Frameworks */ = {
77
+ isa = PBXGroup;
78
+ children = (
79
+ F43A13C713CF10F300FD689C /* UIKit.framework */,
80
+ F43A13C913CF10F300FD689C /* Foundation.framework */,
81
+ F43A13CB13CF10F300FD689C /* CoreGraphics.framework */,
82
+ );
83
+ name = Frameworks;
84
+ sourceTree = "<group>";
85
+ };
86
+ F43A13CD13CF10F300FD689C /* GDataXML-HTML */ = {
87
+ isa = PBXGroup;
88
+ children = (
89
+ F4E0EDE013CF3A2F000E7B3B /* lib */,
90
+ F43A13D613CF10F300FD689C /* GDataXML_HTMLAppDelegate.h */,
91
+ F43A13D713CF10F300FD689C /* GDataXML_HTMLAppDelegate.m */,
92
+ F43A13D913CF10F300FD689C /* MainWindow.xib */,
93
+ F43A13DC13CF10F300FD689C /* GDataXML_HTMLViewController.h */,
94
+ F43A13DD13CF10F300FD689C /* GDataXML_HTMLViewController.m */,
95
+ F43A13DF13CF10F300FD689C /* GDataXML_HTMLViewController.xib */,
96
+ F43A13CE13CF10F300FD689C /* Supporting Files */,
97
+ F4E0EDE513CF7A37000E7B3B /* xml.xml */,
98
+ F4E0EDE713CF7C31000E7B3B /* html.html */,
99
+ );
100
+ path = "GDataXML-HTML";
101
+ sourceTree = "<group>";
102
+ };
103
+ F43A13CE13CF10F300FD689C /* Supporting Files */ = {
104
+ isa = PBXGroup;
105
+ children = (
106
+ F43A13CF13CF10F300FD689C /* GDataXML-HTML-Info.plist */,
107
+ F43A13D013CF10F300FD689C /* InfoPlist.strings */,
108
+ F43A13D313CF10F300FD689C /* GDataXML-HTML-Prefix.pch */,
109
+ F43A13D413CF10F300FD689C /* main.m */,
110
+ );
111
+ name = "Supporting Files";
112
+ sourceTree = "<group>";
113
+ };
114
+ F4E0EDE013CF3A2F000E7B3B /* lib */ = {
115
+ isa = PBXGroup;
116
+ children = (
117
+ F4E0EDE113CF3A2F000E7B3B /* GDataXMLNode.h */,
118
+ F4E0EDE213CF3A2F000E7B3B /* GDataXMLNode.m */,
119
+ );
120
+ path = lib;
121
+ sourceTree = "<group>";
122
+ };
123
+ /* End PBXGroup section */
124
+
125
+ /* Begin PBXNativeTarget section */
126
+ F43A13C213CF10F300FD689C /* GDataXML-HTML */ = {
127
+ isa = PBXNativeTarget;
128
+ buildConfigurationList = F43A13E413CF10F300FD689C /* Build configuration list for PBXNativeTarget "GDataXML-HTML" */;
129
+ buildPhases = (
130
+ F43A13BF13CF10F300FD689C /* Sources */,
131
+ F43A13C013CF10F300FD689C /* Frameworks */,
132
+ F43A13C113CF10F300FD689C /* Resources */,
133
+ );
134
+ buildRules = (
135
+ );
136
+ dependencies = (
137
+ );
138
+ name = "GDataXML-HTML";
139
+ productName = "GDataXML-HTML";
140
+ productReference = F43A13C313CF10F300FD689C /* GDataXML-HTML.app */;
141
+ productType = "com.apple.product-type.application";
142
+ };
143
+ /* End PBXNativeTarget section */
144
+
145
+ /* Begin PBXProject section */
146
+ F43A13BA13CF10F200FD689C /* Project object */ = {
147
+ isa = PBXProject;
148
+ attributes = {
149
+ ORGANIZATIONNAME = "Cyber:con GmbH";
150
+ };
151
+ buildConfigurationList = F43A13BD13CF10F200FD689C /* Build configuration list for PBXProject "GDataXML-HTML" */;
152
+ compatibilityVersion = "Xcode 3.2";
153
+ developmentRegion = English;
154
+ hasScannedForEncodings = 0;
155
+ knownRegions = (
156
+ en,
157
+ );
158
+ mainGroup = F43A13B813CF10F200FD689C;
159
+ productRefGroup = F43A13C413CF10F300FD689C /* Products */;
160
+ projectDirPath = "";
161
+ projectRoot = "";
162
+ targets = (
163
+ F43A13C213CF10F300FD689C /* GDataXML-HTML */,
164
+ );
165
+ };
166
+ /* End PBXProject section */
167
+
168
+ /* Begin PBXResourcesBuildPhase section */
169
+ F43A13C113CF10F300FD689C /* Resources */ = {
170
+ isa = PBXResourcesBuildPhase;
171
+ buildActionMask = 2147483647;
172
+ files = (
173
+ F43A13D213CF10F300FD689C /* InfoPlist.strings in Resources */,
174
+ F43A13DB13CF10F300FD689C /* MainWindow.xib in Resources */,
175
+ F43A13E113CF10F300FD689C /* GDataXML_HTMLViewController.xib in Resources */,
176
+ F4E0EDE613CF7A37000E7B3B /* xml.xml in Resources */,
177
+ F4E0EDE813CF7C31000E7B3B /* html.html in Resources */,
178
+ );
179
+ runOnlyForDeploymentPostprocessing = 0;
180
+ };
181
+ /* End PBXResourcesBuildPhase section */
182
+
183
+ /* Begin PBXSourcesBuildPhase section */
184
+ F43A13BF13CF10F300FD689C /* Sources */ = {
185
+ isa = PBXSourcesBuildPhase;
186
+ buildActionMask = 2147483647;
187
+ files = (
188
+ F43A13D513CF10F300FD689C /* main.m in Sources */,
189
+ F43A13D813CF10F300FD689C /* GDataXML_HTMLAppDelegate.m in Sources */,
190
+ F43A13DE13CF10F300FD689C /* GDataXML_HTMLViewController.m in Sources */,
191
+ F4E0EDE313CF3A2F000E7B3B /* GDataXMLNode.m in Sources */,
192
+ );
193
+ runOnlyForDeploymentPostprocessing = 0;
194
+ };
195
+ /* End PBXSourcesBuildPhase section */
196
+
197
+ /* Begin PBXVariantGroup section */
198
+ F43A13D013CF10F300FD689C /* InfoPlist.strings */ = {
199
+ isa = PBXVariantGroup;
200
+ children = (
201
+ F43A13D113CF10F300FD689C /* en */,
202
+ );
203
+ name = InfoPlist.strings;
204
+ sourceTree = "<group>";
205
+ };
206
+ F43A13D913CF10F300FD689C /* MainWindow.xib */ = {
207
+ isa = PBXVariantGroup;
208
+ children = (
209
+ F43A13DA13CF10F300FD689C /* en */,
210
+ );
211
+ name = MainWindow.xib;
212
+ sourceTree = "<group>";
213
+ };
214
+ F43A13DF13CF10F300FD689C /* GDataXML_HTMLViewController.xib */ = {
215
+ isa = PBXVariantGroup;
216
+ children = (
217
+ F43A13E013CF10F300FD689C /* en */,
218
+ );
219
+ name = GDataXML_HTMLViewController.xib;
220
+ sourceTree = "<group>";
221
+ };
222
+ /* End PBXVariantGroup section */
223
+
224
+ /* Begin XCBuildConfiguration section */
225
+ F43A13E213CF10F300FD689C /* Debug */ = {
226
+ isa = XCBuildConfiguration;
227
+ buildSettings = {
228
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
229
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
230
+ GCC_C_LANGUAGE_STANDARD = gnu99;
231
+ GCC_OPTIMIZATION_LEVEL = 0;
232
+ GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
233
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
234
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
235
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
236
+ GCC_WARN_UNUSED_VARIABLE = YES;
237
+ HEADER_SEARCH_PATHS = /usr/include/libxml2;
238
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
239
+ OTHER_LDFLAGS = "-lxml2";
240
+ SDKROOT = iphoneos;
241
+ };
242
+ name = Debug;
243
+ };
244
+ F43A13E313CF10F300FD689C /* Release */ = {
245
+ isa = XCBuildConfiguration;
246
+ buildSettings = {
247
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
248
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
249
+ GCC_C_LANGUAGE_STANDARD = gnu99;
250
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
251
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
252
+ GCC_WARN_UNUSED_VARIABLE = YES;
253
+ HEADER_SEARCH_PATHS = /usr/include/libxml2;
254
+ IPHONEOS_DEPLOYMENT_TARGET = 4.3;
255
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
256
+ OTHER_LDFLAGS = "-lxml2";
257
+ SDKROOT = iphoneos;
258
+ };
259
+ name = Release;
260
+ };
261
+ F43A13E513CF10F300FD689C /* Debug */ = {
262
+ isa = XCBuildConfiguration;
263
+ buildSettings = {
264
+ ALWAYS_SEARCH_USER_PATHS = NO;
265
+ COPY_PHASE_STRIP = NO;
266
+ GCC_DYNAMIC_NO_PIC = NO;
267
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
268
+ GCC_PREFIX_HEADER = "GDataXML-HTML/GDataXML-HTML-Prefix.pch";
269
+ HEADER_SEARCH_PATHS = /usr/include/libxml2;
270
+ INFOPLIST_FILE = "GDataXML-HTML/GDataXML-HTML-Info.plist";
271
+ OTHER_LDFLAGS = "-lxml2";
272
+ PRODUCT_NAME = "$(TARGET_NAME)";
273
+ WRAPPER_EXTENSION = app;
274
+ };
275
+ name = Debug;
276
+ };
277
+ F43A13E613CF10F300FD689C /* Release */ = {
278
+ isa = XCBuildConfiguration;
279
+ buildSettings = {
280
+ ALWAYS_SEARCH_USER_PATHS = NO;
281
+ COPY_PHASE_STRIP = YES;
282
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
283
+ GCC_PREFIX_HEADER = "GDataXML-HTML/GDataXML-HTML-Prefix.pch";
284
+ HEADER_SEARCH_PATHS = /usr/include/libxml2;
285
+ INFOPLIST_FILE = "GDataXML-HTML/GDataXML-HTML-Info.plist";
286
+ OTHER_LDFLAGS = "-lxml2";
287
+ PRODUCT_NAME = "$(TARGET_NAME)";
288
+ VALIDATE_PRODUCT = YES;
289
+ WRAPPER_EXTENSION = app;
290
+ };
291
+ name = Release;
292
+ };
293
+ /* End XCBuildConfiguration section */
294
+
295
+ /* Begin XCConfigurationList section */
296
+ F43A13BD13CF10F200FD689C /* Build configuration list for PBXProject "GDataXML-HTML" */ = {
297
+ isa = XCConfigurationList;
298
+ buildConfigurations = (
299
+ F43A13E213CF10F300FD689C /* Debug */,
300
+ F43A13E313CF10F300FD689C /* Release */,
301
+ );
302
+ defaultConfigurationIsVisible = 0;
303
+ defaultConfigurationName = Release;
304
+ };
305
+ F43A13E413CF10F300FD689C /* Build configuration list for PBXNativeTarget "GDataXML-HTML" */ = {
306
+ isa = XCConfigurationList;
307
+ buildConfigurations = (
308
+ F43A13E513CF10F300FD689C /* Debug */,
309
+ F43A13E613CF10F300FD689C /* Release */,
310
+ );
311
+ defaultConfigurationIsVisible = 0;
312
+ defaultConfigurationName = Release;
313
+ };
314
+ /* End XCConfigurationList section */
315
+ };
316
+ rootObject = F43A13BA13CF10F200FD689C /* Project object */;
317
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:GDataXML-HTML.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,55 @@
1
+ # Description #
2
+ GDataXML-HTML is a HTML/XML parser for iOS and OSX, based on Google's GDataXML. As the name suggest it adds support for the HTMLparser module of libxml2 and enables you to deal with non validating XML or HTML. So you can use e.g. XPath to easily parse Websites on an iPhone or iPad with reasonable performance
3
+
4
+ # Use in your own project #
5
+ ### Assuming XCode 4 but should work in XCode 3 ###
6
+
7
+ 1. First add the files from the lib/ folder in this project to your source tree, then include them somewhere in your code,
8
+
9
+ 2. In Xcode4 choose the project file (in the project navigator, the top item).
10
+
11
+ 3. In the list choose your project target and select 'Build Settings' at the top of the window.
12
+ Then you should see a list of build options.
13
+
14
+ 4. Add this line to 'Header Search Paths' (use search bar to find the right option)
15
+ /usr/include/libxml2
16
+
17
+ 5. Add this line to 'Other Linker Flags':
18
+ -lxml2
19
+
20
+ ## ARC ##
21
+ ### If your code is using Automatic Reference Counting (ARC) do the following: ###
22
+
23
+ 1. Select Build Phases tab.
24
+
25
+ 2. Expand Compile Sources.
26
+
27
+ 3. Select GDataXMLNode.m then press Enter.
28
+
29
+ 4. On the small input box that pops-out, enter -fno-objc-arc.
30
+
31
+ # Examples #
32
+ There are two usage examples in this project inside the GDataXML_HTMLViewController.m file.
33
+ ### Other examples for GDataXML on the web: ###
34
+
35
+ 1. http://www.raywenderlich.com/725/how-to-read-and-write-xml-documents-with-gdataxml
36
+ 2. http://dubydigital.com/iphone/?p=59
37
+
38
+ # Licence #
39
+ Original GDataXML:
40
+ Copyright (c) 2008 Google Inc
41
+
42
+ Example project and HTML addons:
43
+ Copyright (c) 2012 Simon Grätzer
44
+
45
+ Licensed under the Apache License, Version 2.0 (the "License");
46
+ you may not use this file except in compliance with the License.
47
+ You may obtain a copy of the License at
48
+
49
+ http://www.apache.org/licenses/LICENSE-2.0
50
+
51
+ Unless required by applicable law or agreed to in writing, software
52
+ distributed under the License is distributed on an "AS IS" BASIS,
53
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
54
+ See the License for the specific language governing permissions and
55
+ limitations under the License.
@@ -0,0 +1,229 @@
1
+ /* Modifications for HTML parser support:
2
+ * Copyright (c) 2011 Simon Grätzer simon@graetzer.org
3
+ *
4
+ * Copyright (c) 2008 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ // These node, element, and document classes implement a subset of the methods
20
+ // provided by NSXML. While NSXML behavior is mimicked as much as possible,
21
+ // there are important differences.
22
+ //
23
+ // The biggest difference is that, since this is based on libxml2, there
24
+ // is no retain model for the underlying node data. Rather than copy every
25
+ // node obtained from a parse tree (which would have a substantial memory
26
+ // impact), we rely on weak references, and it is up to the code that
27
+ // created a document to retain it for as long as any
28
+ // references rely on nodes inside that document tree.
29
+
30
+
31
+ #import <Foundation/Foundation.h>
32
+
33
+ // libxml includes require that the target Header Search Paths contain
34
+ //
35
+ // /usr/include/libxml2
36
+ //
37
+ // and Other Linker Flags contain
38
+ //
39
+ // -lxml2
40
+
41
+ #import <libxml/tree.h>
42
+ #import <libxml/parser.h>
43
+ #import <libxml/xmlstring.h>
44
+ #import <libxml/HTMLparser.h>
45
+ #import <libxml/xpath.h>
46
+ #import <libxml/xpathInternals.h>
47
+
48
+
49
+ #if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) || defined(GDATA_TARGET_NAMESPACE)
50
+ // we need NSInteger for the 10.4 SDK, or we're using target namespace macros
51
+ #import "GDataDefines.h"
52
+ #endif
53
+
54
+ #undef _EXTERN
55
+ #undef _INITIALIZE_AS
56
+ #ifdef GDATAXMLNODE_DEFINE_GLOBALS
57
+ #define _EXTERN
58
+ #define _INITIALIZE_AS(x) =x
59
+ #else
60
+ #if defined(__cplusplus)
61
+ #define _EXTERN extern "C"
62
+ #else
63
+ #define _EXTERN extern
64
+ #endif
65
+ #define _INITIALIZE_AS(x)
66
+ #endif
67
+
68
+ // when no namespace dictionary is supplied for XPath, the default namespace
69
+ // for the evaluated tree is registered with the prefix _def_ns
70
+ _EXTERN const char* kGDataXMLXPathDefaultNamespacePrefix _INITIALIZE_AS("_def_ns");
71
+
72
+ // Nomenclature for method names:
73
+ //
74
+ // Node = GData node
75
+ // XMLNode = xmlNodePtr
76
+ //
77
+ // So, for example:
78
+ // + (id)nodeConsumingXMLNode:(xmlNodePtr)theXMLNode;
79
+
80
+ @class NSArray, NSDictionary, NSError, NSString, NSURL;
81
+ @class GDataXMLElement, GDataXMLDocument;
82
+
83
+ enum {
84
+ GDataXMLInvalidKind = 0,
85
+ GDataXMLDocumentKind,
86
+ GDataXMLElementKind,
87
+ GDataXMLAttributeKind,
88
+ GDataXMLNamespaceKind,
89
+ GDataXMLProcessingInstructionKind,
90
+ GDataXMLCommentKind,
91
+ GDataXMLTextKind,
92
+ GDataXMLDTDKind,
93
+ GDataXMLEntityDeclarationKind,
94
+ GDataXMLAttributeDeclarationKind,
95
+ GDataXMLElementDeclarationKind,
96
+ GDataXMLNotationDeclarationKind
97
+ };
98
+
99
+ typedef NSUInteger GDataXMLNodeKind;
100
+
101
+ @interface GDataXMLNode : NSObject <NSCopying> {
102
+ @protected
103
+ // NSXMLNodes can have a namespace URI or prefix even if not part
104
+ // of a tree; xmlNodes cannot. When we create nodes apart from
105
+ // a tree, we'll store the dangling prefix or URI in the xmlNode's name,
106
+ // like
107
+ // "prefix:name"
108
+ // or
109
+ // "{http://uri}:name"
110
+ //
111
+ // We will fix up the node's namespace and name (and those of any children)
112
+ // later when adding the node to a tree with addChild: or addAttribute:.
113
+ // See fixUpNamespacesForNode:.
114
+
115
+ xmlNodePtr xmlNode_; // may also be an xmlAttrPtr or xmlNsPtr
116
+ BOOL shouldFreeXMLNode_; // if yes, xmlNode_ will be free'd in dealloc
117
+
118
+ // cached values
119
+ NSString *cachedName_;
120
+ NSArray *cachedChildren_;
121
+ NSArray *cachedAttributes_;
122
+ }
123
+
124
+ + (GDataXMLElement *)elementWithName:(NSString *)name;
125
+ + (GDataXMLElement *)elementWithName:(NSString *)name stringValue:(NSString *)value;
126
+ + (GDataXMLElement *)elementWithName:(NSString *)name URI:(NSString *)value;
127
+
128
+ + (id)attributeWithName:(NSString *)name stringValue:(NSString *)value;
129
+ + (id)attributeWithName:(NSString *)name URI:(NSString *)attributeURI stringValue:(NSString *)value;
130
+
131
+ + (id)namespaceWithName:(NSString *)name stringValue:(NSString *)value;
132
+
133
+ + (id)textWithStringValue:(NSString *)value;
134
+
135
+ - (NSString *)stringValue;
136
+ - (void)setStringValue:(NSString *)str;
137
+
138
+ - (NSUInteger)childCount;
139
+ - (NSArray *)children;
140
+ - (GDataXMLNode *)childAtIndex:(unsigned)index;
141
+
142
+ - (NSString *)localName;
143
+ - (NSString *)name;
144
+ - (NSString *)prefix;
145
+ - (NSString *)URI;
146
+
147
+ - (GDataXMLNodeKind)kind;
148
+
149
+ - (NSString *)XMLString;
150
+
151
+ + (NSString *)localNameForName:(NSString *)name;
152
+ + (NSString *)prefixForName:(NSString *)name;
153
+
154
+ // This is the preferred entry point for nodesForXPath. This takes an explicit
155
+ // namespace dictionary (keys are prefixes, values are URIs).
156
+ - (NSArray *)nodesForXPath:(NSString *)xpath namespaces:(NSDictionary *)namespaces error:(NSError **)error;
157
+
158
+ // This implementation of nodesForXPath registers namespaces only from the
159
+ // document's root node. _def_ns may be used as a prefix for the default
160
+ // namespace, though there's no guarantee that the default namespace will
161
+ // be consistenly the same namespace in server responses.
162
+ - (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error;
163
+
164
+ // access to the underlying libxml node; be sure to release the cached values
165
+ // if you change the underlying tree at all
166
+ - (xmlNodePtr)XMLNode;
167
+ - (void)releaseCachedValues;
168
+
169
+ @end
170
+
171
+
172
+ @interface GDataXMLElement : GDataXMLNode
173
+
174
+ - (id)initWithXMLString:(NSString *)str error:(NSError **)error;
175
+ - (id)initWithHTMLString:(NSString *)str error:(NSError **)error;
176
+
177
+ - (NSArray *)namespaces;
178
+ - (void)setNamespaces:(NSArray *)namespaces;
179
+ - (void)addNamespace:(GDataXMLNode *)aNamespace;
180
+
181
+ // addChild adds a copy of the child node to the element
182
+ - (void)addChild:(GDataXMLNode *)child;
183
+ - (void)removeChild:(GDataXMLNode *)child;
184
+
185
+ - (NSArray *)elementsForName:(NSString *)name;
186
+ - (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString *)URI;
187
+
188
+ - (NSArray *)attributes;
189
+ - (GDataXMLNode *)attributeForName:(NSString *)name;
190
+ - (GDataXMLNode *)attributeForLocalName:(NSString *)name URI:(NSString *)attributeURI;
191
+ - (void)addAttribute:(GDataXMLNode *)attribute;
192
+
193
+ - (NSString *)resolvePrefixForNamespaceURI:(NSString *)namespaceURI;
194
+
195
+ @end
196
+
197
+ @interface GDataXMLDocument : NSObject {
198
+ @protected
199
+ xmlDoc* xmlDoc_; // strong; always free'd in dealloc
200
+ }
201
+
202
+ - (id)initWithXMLString:(NSString *)str options:(unsigned int)mask error:(NSError **)error;
203
+ - (id)initWithHTMLString:(NSString *)str options:(unsigned int)mask error:(NSError **)error;
204
+
205
+ - (id)initWithData:(NSData *)data options:(unsigned int)mask error:(NSError **)error;
206
+ - (id)initWithHTMLData:(NSData *)data options:(unsigned int)mask error:(NSError **)error;
207
+
208
+ // initWithRootElement uses a copy of the argument as the new document's root
209
+ - (id)initWithRootElement:(GDataXMLElement *)element;
210
+
211
+ - (GDataXMLElement *)rootElement;
212
+
213
+ - (NSData *)XMLData;
214
+
215
+ - (void)setVersion:(NSString *)version;
216
+ - (void)setCharacterEncoding:(NSString *)encoding;
217
+
218
+ // This is the preferred entry point for nodesForXPath. This takes an explicit
219
+ // namespace dictionary (keys are prefixes, values are URIs).
220
+ - (NSArray *)nodesForXPath:(NSString *)xpath namespaces:(NSDictionary *)namespaces error:(NSError **)error;
221
+
222
+ // This implementation of nodesForXPath registers namespaces only from the
223
+ // document's root node. _def_ns may be used as a prefix for the default
224
+ // namespace, though there's no guarantee that the default namespace will
225
+ // be consistenly the same namespace in server responses.
226
+ - (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error;
227
+
228
+ - (NSString *)description;
229
+ @end
@@ -0,0 +1,3 @@
1
+ #ifdef __OBJC__
2
+ #import <UIKit/UIKit.h>
3
+ #endif
@@ -0,0 +1,15 @@
1
+ #!/bin/sh
2
+
3
+ install_resource()
4
+ {
5
+ case $1 in
6
+ *.xib)
7
+ echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${SRCROOT}/Pods/$1 --sdk ${SDKROOT}"
8
+ ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xib`.nib ${SRCROOT}/Pods/$1 --sdk ${SDKROOT}
9
+ ;;
10
+ *)
11
+ echo "cp -R ${SRCROOT}/Pods/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
12
+ cp -R "${SRCROOT}/Pods/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
13
+ ;;
14
+ esac
15
+ }