Welcome Guest, Not a member yet? Register   Sign In
[Resolved] Is CI's XML-RPC class the solution for this problem?
#4

[eluser]pistolPete[/eluser]
[quote author="Fenix" date="1237156196"]Also, with SimpleXML I'm not sure how to load xml from an external website like this.[/quote]

It's pretty simple:
Code:
$xml = simplexml_load_file('http://isbndb.com/api/books.xml?access_key=YS5KDLE8&results=details&index1=isbn&value1=9780596529963');

$bookdata = $xml->BookList->BookData;

echo '<pre>'.print_r($bookdata, TRUE).'</pre>';

output:
Code:
SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [book_id] => web_2_0_a_strategy_guide
            [isbn] => 0596529961
            [isbn13] => 9780596529963
        )

    [Title] => Web 2. 0
    [TitleLong] => Web 2. 0: a strategy guide
    [AuthorsText] => Amy Shuen
    [PublisherText] => Beijing ; O'Reilly, c2008.
    [Details] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [change_time] => 2009-01-14T06:44:38Z
                    [price_time] => 2009-03-15T16:41:00Z
                    [edition_info] => (pbk.)
                    [language] => eng
                    [physical_description_text] => xxii, 243 p. : ill. ; 23 cm.
                    [lcc_number] => HD30.2
                    [dewey_decimal_normalized] => 658.4038011
                    [dewey_decimal] => 658.4038011
                )

        )

)


Messages In This Thread
[Resolved] Is CI's XML-RPC class the solution for this problem? - by El Forum - 03-15-2009, 11:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB