Revision: 29219
http://sourceforge.net/p/bibdesk/svn/29219
Author: hofman
Date: 2025-04-27 16:26:25 +0000 (Sun, 27 Apr 2025)
Log Message:
-----------
no need for import of marc parser, no need to provide default string
Modified Paths:
--------------
trunk/bibdesk/BDSKSRUGroupServer.m
Modified: trunk/bibdesk/BDSKSRUGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-27 16:16:18 UTC (rev 29218)
+++ trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-27 16:26:25 UTC (rev 29219)
@@ -39,7 +39,6 @@
#import "BDSKSRUGroupServer.h"
#import "BDSKServerInfo.h"
#import "BDSKStringParser.h"
-#import "BDSKMARCParser.h"
#import "BibItem.h"
#import "NSString_BDSKExtensions.h"
#import "NSURL_BDSKExtensions.h"
@@ -277,11 +276,10 @@
NSXMLDocument *document = nil;
if (data)
document = [[NSXMLDocument alloc] initWithData:data
options:NSXMLNodeOptionsNone error:NULL];
-
+
if (nil != document) {
NSXMLElement *root = [document rootElement];
- // we need to extract WebEnv, Count, and QueryKey to construct
our final URL
NSString *countString = [[[root
nodesForXPath:@"/zs:searchRetrieveResponse[1]/zs:numberOfRecords[1]"
error:NULL] firstObject] stringValue];
availableResults = [countString integerValue];
@@ -308,16 +306,16 @@
NSXMLDocument *document = nil;
if (data)
document = [[NSXMLDocument alloc] initWithData:data
options:NSXMLNodeOptionsNone error:NULL];
-
+
if (nil != document) {
NSXMLElement *root = [document rootElement];
- NSArray *records = [root
nodesForXPath:@"/zs:searchRetrieveResponse[1]/zs:records[1]/zs:record/zs:recordData"
error:NULL];
+ NSArray *records = [root
nodesForXPath:@"/zs:searchRetrieveResponse[1]/zs:records[1]/zs:record/zs:recordData[1]/*[1]"
error:NULL];
NSMutableArray *pubs = [NSMutableArray array];
for (NSXMLNode *node in records) {
- NSString *record = [[[node children] firstObject]
XMLString] ?: @"";
+ NSString *record = [node XMLString];
BDSKStringType stringType = [self
stringTypeForRecordString:record];
BibItem *pub = [[BDSKStringParser itemsFromString:record
ofType:stringType error:NULL] firstObject];
if (pub == nil)
@@ -335,6 +333,7 @@
downloadState = BDSKSRUStateIdle;
[group addPublications:nil];
}
+
break;
}
case BDSKSRUStateIdle:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit