Define function to operate XML files.
More...
#import <Coconut/Coconut.h>
#import <libxml/tree.h>
#import "CNIOError.h"
Go to the source code of this file.
Functions |
xmlDocPtr | CNXMLReadFromFile (FILE *file, const char *baseurl, NSError **error) |
| Read XML file from file.
|
xmlDocPtr | CNXMLReadFromURL (NSURL *url, NSError **error) |
| Read XML file at given URL.
|
xmlDocPtr | CNXMLReadFromBuffer (const char *buffer, int bufsize, const char *baseurl, NSError **error) |
| Read XML file from buffer on the memory.
|
NSError * | CNXMLWriteToFile (FILE *file, xmlDocPtr src) |
| Write XML file to stream.
|
NSError * | CNXMLWriteToURL (NSURL *url, xmlDocPtr src) |
| Write XML file to given URL.
|
Detailed Description
Define function to operate XML files.
- Copyright
- Copyright (C) 2012 Steel Wheels Project
Function Documentation
xmlDocPtr CNXMLReadFromFile |
( |
FILE * |
file, |
|
|
const char * |
baseurl, |
|
|
NSError ** |
error |
|
) |
| |
Read XML file from file.
- Return values:
-
doc | XML document |
NULL | Failed to read the XML document |
- Parameters:
-
file | Input file stream |
baseurl | URL for this buffer |
error | The error information. This is set the returned value is NULL |
xmlDocPtr CNXMLReadFromURL |
( |
NSURL * |
url, |
|
|
NSError ** |
error |
|
) |
| |
Read XML file at given URL.
- Return values:
-
doc | XML document |
NULL | Failed to read the XML document |
- Parameters:
-
url | Location of the file |
error | The error information. This is set the returned value is NULL |
xmlDocPtr CNXMLReadFromBuffer |
( |
const char * |
buffer, |
|
|
int |
bufsize, |
|
|
const char * |
baseurl, |
|
|
NSError ** |
error |
|
) |
| |
Read XML file from buffer on the memory.
- Return values:
-
doc | XML document |
NULL | Failed to read the XML document |
- Parameters:
-
buffer | Source buffer to be read |
bufsize | Length of the source buffer |
baseurl | URL for this buffer |
error | The error information. This is set the returned value is NULL |
NSError* CNXMLWriteToFile |
( |
FILE * |
file, |
|
|
xmlDocPtr |
src |
|
) |
| |
Write XML file to stream.
- Return values:
-
nil | Writing succeeded |
error | Writing failed, the reason is stored in this object |
- Parameters:
-
file | Output file stream |
src | Source XML document |
NSError* CNXMLWriteToURL |
( |
NSURL * |
url, |
|
|
xmlDocPtr |
src |
|
) |
| |
Write XML file to given URL.
- Return values:
-
nil | Writing succeeded |
error | Writing failed, the reason is stored in this object |
- Parameters:
-
url | Location of the file |
src | Source XML document |