ECXMLControl


Abstract

Constructs a graph of objects based on an XML stream.

Methods

-addDefaultRules
Method used to add the default rules to this controller. These rules are ECXMLControlDefaultAllocatorRule, ECXMLControlReferenceRule, ECXMLControlSetAttributeRule, ECXMLControlLinkObjectRule
-delegateErrorsTo
Specifies the method used to call in case of an parsing error
-delegateErrorsTo:usingMethod:
Specifies the method used to call in case of an parsing error
-enableDefaultRules:
By default the default rules are enabled. Using this method they may be disabled.
-initWithContentsOfURL:
initializes using a specified file
-initWithData:
Initializes using the specified data
-parseXML
starts parsing the given XML
-rootUserObject
-ruleSelector
returns the underlying rule selector. this instance may be used to install own rules
-userObjects

addDefaultRules


Method used to add the default rules to this controller. These rules are ECXMLControlDefaultAllocatorRule, ECXMLControlReferenceRule, ECXMLControlSetAttributeRule, ECXMLControlLinkObjectRule

- addDefaultRules;
method result
self
Discussion

This method is automatically been called by the implementation before the parsing process if not one before.


delegateErrorsTo


Specifies the method used to call in case of an parsing error

See Also:
delegateErrorsTo:usingMethod:
- delegateErrorsTo: (id) receiver usingMethod: (SEL) anErrorHandler;
Parameter Descriptions
anErrorHandler
error handling getting the underlying NSXMLParser instance and an error code
method result
self
Discussion

This method has to conform to

 - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError


delegateErrorsTo:usingMethod:


Specifies the method used to call in case of an parsing error

See Also:
delegateErrorsTo
- delegateErrorsTo: (id) receiver usingMethod: (SEL) anErrorHandler;
Parameter Descriptions
anErrorHandler
error handling getting the underlying NSXMLParser instance and an error code
Discussion

This method has to conform to

 - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError


enableDefaultRules:


By default the default rules are enabled. Using this method they may be disabled.

- enableDefaultRules: (BOOL) enable;
Parameter Descriptions
enable
if NO then default rules are disabled.
method result
self

initWithContentsOfURL:


initializes using a specified file

- initWithContentsOfURL: (NSURL *) anURL;
Parameter Descriptions
anURL
URL to read the XML data from
method result
self

initWithData:


Initializes using the specified data

- initWithData: (NSData *) data;
Parameter Descriptions
data
data to be intepreted as XML
method result
self

parseXML


starts parsing the given XML

- parseXML;
method result
resulting root object

rootUserObject


- (id) rootUserObject;
method result
returns the first allocated user object, which normally represents the root object. nil may be returned if no object has been allocated.

ruleSelector


returns the underlying rule selector. this instance may be used to install own rules

- (ECXMLControlRuleSelector *) ruleSelector;
method result
underlying rule selector
Discussion

Note: Modifying the rule selector during the parsing process is undefined.


userObjects


- (NSArray *) userObjects;
method result
returns all allocated user objects in the order of their allocation.an empty array may be returned if no object has been allocated.

(Last Updated November 08, 2007)