Can anyone help me with how I can retrive the data of this XML with PHP i need to echo the <dc> data ex. <dc:title> and so on.
XML file: http://askbib.asker.folkebibl.no/cgi-bin/sru?operation=searchRetrieve&version=1.2&query=rec.identifier=%22261118%22&recordSchema=dc&startRecord=1&maximumRecords=10
Eirik
15
Newbie Poster
Recommended Answers
Jump to PostMake an effort to solve this, post your PHP code here, and then we may be able to help.
Jump to PostHere's a start...
<?php $dom = new DOMDocument(); $dom->load('cerdi.xml'); $dcs = $dom->getElementsByTagName('dc'); foreach ($dcs as $dc) {
I managed to get it to work. As rubberman says, show some effort and we'll help you along.
Jump to PostThis is new for me so I need help to complete this task. Will u help me to get a working example?
Well, I've given you a heads up with regard to DOMDocument. Alternatively you could use SImpleXML or a number of other libraries/classes. You just need an …
All 9 Replies
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
diafol
Eirik
15
Newbie Poster
diafol
Eirik
15
Newbie Poster
diafol
Eirik
15
Newbie Poster
diafol
commented:
Good job :)
+15
diafol
Eirik
15
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.