FSXMLHttpRequest Class Reference
| Inherits from | NSObject |
| Declared in | FSXMLHttpRequest.h |
Overview
FSXMLHttpRequest is a class for retrieving data in the XML format over a HTTP or HTTPS connection. It provides the necessary foundation for parsing the retrieved XML data. This class is not meant to be used directly but subclassed to a specific requests.
The usage pattern is the following:
- Specify the URL with the url property.
- Define the onCompletion and onFailure handlers.
- Call the start method.
Tasks
-
urlproperty -
onCompletionproperty -
onFailureproperty -
lastErrorproperty -
– start -
– cancel -
– performXPathQuery: -
– contentForNode: -
– contentForNodeAttribute:attribute: -
– dateFromNode:
Properties
lastError
If the request fails, contains the latest error status.
@property (readonly) FSXMLHttpRequestError lastErrorDiscussion
If the request fails, contains the latest error status.
Declared In
FSXMLHttpRequest.honCompletion
Called upon completion of the request.
@property (copy) void ( ^ ) ( ) onCompletionDiscussion
Called upon completion of the request.
Declared In
FSXMLHttpRequest.hInstance Methods
cancel
Cancels the request.
- (void)cancelDiscussion
Cancels the request.
Declared In
FSXMLHttpRequest.hcontentForNode:
Retrieves content for the given XML node.
- (NSString *)contentForNode:(xmlNodePtr)nodeParameters
- node
The node for content retreval.
Discussion
Retrieves content for the given XML node.
Declared In
FSXMLHttpRequest.hcontentForNodeAttribute:attribute:
Retrieves content for the given XML node attribute.
- (NSString *)contentForNodeAttribute:(xmlNodePtr)node attribute:(const char *)attrParameters
- node
The node for content retrieval.
- attr
The attribute from which the content is retrieved.
Discussion
Retrieves content for the given XML node attribute.
Declared In
FSXMLHttpRequest.hdateFromNode:
Retrieves date from the given XML node.
- (NSDate *)dateFromNode:(xmlNodePtr)nodeParameters
- node
The node for retrieving the date.
Discussion
Retrieves date from the given XML node.
Declared In
FSXMLHttpRequest.hperformXPathQuery:
Performs an XPath query on the parsed XML data. Yields a parseXMLNode method call, which must be defined in the subclasses.
- (NSArray *)performXPathQuery:(NSString *)queryParameters
- query
The XPath query to be performed.
Discussion
Performs an XPath query on the parsed XML data. Yields a parseXMLNode method call, which must be defined in the subclasses.
Declared In
FSXMLHttpRequest.h