Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have this url: http://bws.buscape.com/service/offers/lomadee/65717751673178504d42633d/BR/?sourceId=28400481&advertiserId=5889&page=1

Which, as you can see, does not endup with the .xml extension, yet, if you access it, the browser will display an xml document autogenerated from that url. You can even validate it if you want.

What I need to do is:

Use javascript or php to convert all the xml elements into images, urls and text. I saw somewhere saying to use xls, but I don't beleve if it would help me, as I need to integrate the code on a blog article.

share|improve this question
    
So you basically want to display the XML document as if it were a formatted HTML document? –  Jonathan M 13 hours ago
    
yes, that's right. –  Spike 12 hours ago
add comment

1 Answer

It would be easier to use the PHP XML API, particularly the DOM API to write a PHP script that parses that XML. XSLT is overkill for something like that.

share|improve this answer
    
Might this help? php.net/manual/en/example.xml-map-tags.php In your case changing the elements in $map_array to the ones you need. Eg. "offer" => "div", "link" => "a", etc. I'm not sure how you would add attributes to the tags though... –  mjwatts 12 hours ago
    
actually, what I'm looking for is just a way to display the xml content as html, I don't need to save it to a database or something. –  Spike 9 hours ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.