DOMPreprocessor Class Reference

Inheritance diagram for DOMPreprocessor:

DOMEntityResolver List of all members.

Detailed Description

Preprocessors work on the raw data before it's sent to the builder.

There is currently no hook in the DOMBuilder class to set preprocessors to use before building, so this is a suggestion on how to use them:

 NSData *data = ...;
 DOMPreprocessor *preprocessor = ...;

 id < DOMDocument > doc = [[DOMBuilder defaultBuilder]
     buildFromData:[preprocessor process:data]

Preprocessors can be good for many things, for example to resolve external dependencies and processing instructions.

Public Member Functions

(NSData *)  process:
(NSData *)  process:sourceURL:

Static Public Member Functions

(DOMPreprocessor *)  preprocessor

Member Function Documentation

+ (DOMPreprocessor *) preprocessor  

- (NSData *) process: (NSData *)  data  

Process a chunk of data.

- (NSData *) process: (NSData *)  data
sourceURL: (NSURL *)  sourceURL

Process a chunk of data.

The source URL is used to resolve any external dependencies.