Skip to content

Commit

Permalink
Merging latest changes from KissXML project.
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiehanson committed Nov 23, 2011
1 parent 921537f commit a189e42
Show file tree
Hide file tree
Showing 8 changed files with 1,031 additions and 281 deletions.
43 changes: 37 additions & 6 deletions Vendor/KissXML/DDXML.h
@@ -1,9 +1,35 @@
#if TARGET_OS_IPHONE
/**
* Welcome to KissXML.
*
* The project page has documentation if you have questions.
* https://github.com/robbiehanson/KissXML
*
* If you're new to the project you may wish to read the "Getting Started" wiki.
* https://github.com/robbiehanson/KissXML/wiki/GettingStarted
*
* KissXML provides a drop-in replacement for Apple's NSXML class cluster.
* The goal is to get the exact same behavior as the NSXML classes.
*
* For API Reference, see Apple's excellent documentation,
* either via Xcode's Mac OS X documentation, or via the web:
*
* https://github.com/robbiehanson/KissXML/wiki/Reference
**/

#import "DDXMLNode.h"
#import "DDXMLElement.h"
#import "DDXMLDocument.h"



#if TARGET_OS_IPHONE

// Since KissXML is a drop in replacement for NSXML,
// it may be desireable (when writing cross-platform code to be used on both Mac OS X and iOS)
// to use the NSXML prefixes instead of the DDXML prefix.
//
// This way, on Mac OS X it uses NSXML, and on iOS it uses KissXML.

#ifndef NSXMLNode
#define NSXMLNode DDXMLNode
#endif
Expand Down Expand Up @@ -67,8 +93,12 @@
#define NSXMLNodePrettyPrint DDXMLNodePrettyPrint
#endif

#endif // #if TARGET_OS_IPHONE



// KissXML has rather straight-forward memory management:
// http://code.google.com/p/kissxml/wiki/MemoryManagementThreadSafety
// https://github.com/robbiehanson/KissXML/wiki/MemoryManagementThreadSafety
//
// There are 3 important concepts to keep in mind when working with KissXML:
//
Expand Down Expand Up @@ -145,7 +175,7 @@
// Heap corruption is one of the worst problems to track down.
// So to help out, the library provides a debugging macro to track down these problems.
// That is, if you invalidate the write-access thread-unsafe rule,
// this macro will tell you when you're trying to access a no-dangling pointer.
// this macro will tell you when you're trying to access a now-dangling pointer.
//
// How does it work?
// Well everytime a DDXML wrapper object is created atop a libxml structure,
Expand All @@ -154,12 +184,13 @@
// So everytime a DDXML wrapper objects is about to dereference it's pointer,
// it first ensures the linkage still exists in the table.
//
// The debugging macro adds a significant amount of overhead, and shouldn't be enabled on production builds.
// Set to 1 to enable
// Set to 0 to disable (this is the default)
//
// The debugging macro adds a significant amount of overhead, and should NOT be enabled on production builds.

#if DEBUG
#define DDXML_DEBUG_MEMORY_ISSUES 0
#else
#define DDXML_DEBUG_MEMORY_ISSUES 0 // Don't change me!
#endif

#endif
17 changes: 17 additions & 0 deletions Vendor/KissXML/DDXMLDocument.h
Expand Up @@ -2,6 +2,23 @@
#import "DDXMLElement.h"
#import "DDXMLNode.h"

/**
* Welcome to KissXML.
*
* The project page has documentation if you have questions.
* https://github.com/robbiehanson/KissXML
*
* If you're new to the project you may wish to read the "Getting Started" wiki.
* https://github.com/robbiehanson/KissXML/wiki/GettingStarted
*
* KissXML provides a drop-in replacement for Apple's NSXML class cluster.
* The goal is to get the exact same behavior as the NSXML classes.
*
* For API Reference, see Apple's excellent documentation,
* either via Xcode's Mac OS X documentation, or via the web:
*
* https://github.com/robbiehanson/KissXML/wiki/Reference
**/

enum {
DDXMLDocumentXMLKind = 0,
Expand Down
17 changes: 17 additions & 0 deletions Vendor/KissXML/DDXMLDocument.m
@@ -1,6 +1,23 @@
#import "DDXMLPrivate.h"
#import "NSString+DDXML.h"

/**
* Welcome to KissXML.
*
* The project page has documentation if you have questions.
* https://github.com/robbiehanson/KissXML
*
* If you're new to the project you may wish to read the "Getting Started" wiki.
* https://github.com/robbiehanson/KissXML/wiki/GettingStarted
*
* KissXML provides a drop-in replacement for Apple's NSXML class cluster.
* The goal is to get the exact same behavior as the NSXML classes.
*
* For API Reference, see Apple's excellent documentation,
* either via Xcode's Mac OS X documentation, or via the web:
*
* https://github.com/robbiehanson/KissXML/wiki/Reference
**/

@implementation DDXMLDocument

Expand Down
17 changes: 17 additions & 0 deletions Vendor/KissXML/DDXMLElement.h
@@ -1,6 +1,23 @@
#import <Foundation/Foundation.h>
#import "DDXMLNode.h"

/**
* Welcome to KissXML.
*
* The project page has documentation if you have questions.
* https://github.com/robbiehanson/KissXML
*
* If you're new to the project you may wish to read the "Getting Started" wiki.
* https://github.com/robbiehanson/KissXML/wiki/GettingStarted
*
* KissXML provides a drop-in replacement for Apple's NSXML class cluster.
* The goal is to get the exact same behavior as the NSXML classes.
*
* For API Reference, see Apple's excellent documentation,
* either via Xcode's Mac OS X documentation, or via the web:
*
* https://github.com/robbiehanson/KissXML/wiki/Reference
**/

@interface DDXMLElement : DDXMLNode
{
Expand Down

0 comments on commit a189e42

Please sign in to comment.