PHP XMLOPAC Class update

iii-xmlopac-1.4.tar.gz

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • scuttle
  • Shadows
  • Simpy
  • TailRank
  • YahooMyWeb

Another update to the III XMLOPAC class. The function get_opac_data() now returns the number of holds a bib-item has. Originally I thought this wasn’t going to be possible since I didn’t see anything overtly obvious in the XML result set, but I did see a bunch of weird “HOLD” elements with a lot of useless associated data. My hunch was that each one of these represented a bib-level hold, and I was right! Anyway, by tallying the number of these hold objects in the XML, I was able to determine the number of holds for that record.

Incidentally, this is what the nonsense looks like to SimpleXML:

[21] => SimpleXMLElement Object (
   [VARFLDPRIMARY] => SimpleXMLElement Object ( 
    [VARFLD] => SimpleXMLElement Object (
       [HEADER] => SimpleXMLElement Object ( 
        [TAG] => 8
        [NAME] => HOLD 
        [LABEL] => Hold 
        [SEQUENCENUM] => 12
      )
      [DisplayForm] => SimpleXMLElement Object ( )
      [RTL] => 0
      [FIELDDATA] => SimpleXMLElement Object ( )
    )
  )
)

What a mess. Anyway, it’s workable, the number of holds is now passed back, keyed by “holds”. If there are no holds, there will be no holds key in the result.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • scuttle
  • Shadows
  • Simpy
  • TailRank
  • YahooMyWeb

2 Comments so far
Leave a comment

Extending Blyberg’s XMLOPAC Class

AADL’s John Blyberg is doing some great stuff with III’s XML Server, and his XMLOPAC PHP class is just what we need to start making use of the product (and cut through the bad XML it outputs). I’ve started re-writing the work I did p…

[…] No, I’m not talking about the interface our users see in the web browser — there’s enough argument about that — I’m talking about web services, the technologies that form much of the infrastructure for Web 2.0. […]



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)