// We'll use the xmlsave API so we can strip the xml declaration
xmlSaveCtxtPtrsaveContext;
if([selfdownloadDestinationPath]){
saveContext=xmlSaveToFd([[NSFileHandlefileHandleForWritingAtPath:[selfdownloadDestinationPath]]fileDescriptor],NULL,2);// 2 == XML_SAVE_NO_DECL, this isn't declared on Mac OS 10.5
xmlSaveDoc(saveContext,doc);
xmlSaveClose(saveContext);
// We'll use the xmlsave API so we can strip the xml declaration
xmlSaveCtxtPtrsaveContext;
if([selfdownloadDestinationPath]){
saveContext=xmlSaveToFd([[NSFileHandlefileHandleForWritingAtPath:[selfdownloadDestinationPath]]fileDescriptor],NULL,2);// 2 == XML_SAVE_NO_DECL, this isn't declared on Mac OS 10.5
saveContext=xmlSaveToFd([[NSFileHandlefileHandleForWritingAtPath:tempPath]fileDescriptor],NULL,2);// 2 == XML_SAVE_NO_DECL, this isn't declared on Mac OS 10.5
saveContext=xmlSaveToFd([[NSFileHandlefileHandleForWritingAtPath:tempPath]fileDescriptor],NULL,2);// 2 == XML_SAVE_NO_DECL, this isn't declared on Mac OS 10.5
[selffailWithError:[NSErrorerrorWithDomain:NetworkRequestErrorDomaincode:101userInfo:[NSDictionarydictionaryWithObjectsAndKeys:@"Error: unable to create new XPath context",NSLocalizedDescriptionKey,nil]]];