Ben bu gibi bakarak kullanıcının metalar içeren harici bir xml dosyasını yüklemek:
<?xml version="1.0" encoding="utf-8"?>
<user_information>
<user url="http://usersweb.com">
<name>Arnold</name>
<lastname>
<name>Arnoldson</name>
</lastname>
<age>42</age>
</user>
<user url="http://anotheruserweb.com">
<name>Arnold</name>
<lastname>
<name>Arichson</name>
</lastname>
<age>42</age>
</user>
And so on....
</user_information>
Ben ile biçimlendirmeyi biliyorum
<lastname>
gerçekten aptal, ama kaynağını değiştiremezsiniz.
Ben gelen "url"-özniteliği yüklemek istediğiniz
<user>
Ama yalnızca
<name>
ve
<lastname>
benim kendi kullanıcı veritabanında sakladığınız adı değerlerini eşleşir.
PHP ile geri kalanını ayrıştırmak için nasıl biliyorum, ama sadece eşleşen sırası bana zor görünüyor. Herhangi bir yardım mutluluk!
EDIT: Since i can not give you the source XML, i found a similar code structure in the Spotify Metadata API. We can laborate with the returning XML-file from the track search "Domino Dancing": ws.spotify.com/search/1/track?q=Domino Dancing
Bu tam olarak aynı structur vardır, diğer kelimeleri kullanmak excepts. Dönen dosya bu gibi görünüyor:
<?xml version="1.0" encoding="utf-8"?>
<tracks xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns="http://www.spotify.com/ns/music/1">
<opensearch:Query role="request" startPage="1" searchTerms="Domino Dancing"/>
<opensearch:totalResults>39</opensearch:totalResults>
<opensearch:startIndex>0</opensearch:startIndex>
<opensearch:itemsPerPage>100</opensearch:itemsPerPage>
<track href="spotify:track:2aV5vCNH5tOOe0GGKqfx5Z">
<name>Domino dancing</name>
<artist href="spotify:artist:2ycnb8Er79LoH2AsR5ldjh">
<name>Pet Shop Boys</name>
</artist>
<id type="isrc">GBAYE0301704</id>
<album href="spotify:album:0BAfuhzkGjckMhsL2gVbzR">
<name>Ultimate</name>
<released>2010</released>
<availability>
<territories>AT BE CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IT LT LU NL NO PL PT RO SE SI SK</territories>
</availability>
</album>
<track-number>7</track-number>
<length>258.106000</length>
<popularity>0.57092</popularity>
</track>
<track href="spotify:track:4mVLzFbc3gaCoWCEENLouc">
<name>Domino Dancing</name>
<artist href="spotify:artist:2ycnb8Er79LoH2AsR5ldjh">
<name>Pet Shop Boys</name>
</artist>
<id type="isrc">GBAYE8800056</id>
<album href="spotify:album:0Jt2LzWgtGxy3GZH5i2Kcy">
<name>Discography - Complete Singles Collection</name>
<released>1991</released>
<availability>
<territories>AT BE CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IT LT LU NL NO PL PT RO SE SI SK</territories>
</availability>
</album>
<track-number>10</track-number>
<length>258.333000</length>
<popularity>0.56159</popularity>
</track>
<track href="spotify:track:72kgJ1brMxxeDiPNdH6qqW">
<name>Viva la vida/Domino dancing</name>
<artist href="spotify:artist:2ycnb8Er79LoH2AsR5ldjh">
<name>Pet Shop Boys</name>
</artist>
<id type="isrc">GBCEW0900049</id>
<album href="spotify:album:4DZfMTDyBwnJQ0k1PaT6U4">
<name>Pet Shop Boys Christmas</name>
<released>2009</released>
<availability>
<territories>AT BE CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IT LT LU NL NO PL PT RO SE SI SK</territories>
</availability>
</album>
<track-number>4</track-number>
<length>333.507000</length>
<popularity>0.51961</popularity>
</track>
</tracks>
If we pretend that user_information=tracks user=track url=href lastname=artist.
Bu yardımcı olur umarım!
EDIT2: I solved it using Xpath Document venamespaces. Thank you all for trying!