2015-05-26 3 views
0

предположительно !! Мне нужно, чтобы отобразить эти рюшечкиКак отобразить XML-файл на странице HTML с помощью Ajax?

<products> 

     <product category="Clothes" title= "Rock Paper Scissors Lizard Spock" price="19.99" film="The Big Bang Theory" id="1"> 
      <description>THROW DOWN 
For folks too lazy to break out Urban Spoon when deciding on lunch, we offer a superior alternative to Rock Paper Scissors. And if you wear this shirt while making the decision, you can always remember what beats what because we've provided handy arrows.</description> 
      <stock>5</stock> 
      <imagesource>images/series/tbbt/products/rpss.jpg</imagesource> 
     </product> 

     <product category="Merchandise" title= "Periodic Table Shower Curtain" price="29.99" film="The Big Bang Theory" id="2"> 
      <description> 
       CLEANLINESS IS NEXT TO AMERICIUM 
Shower curtain features Periodic Table of Elements 
71 inches of inspiring, beautiful chemistry 
Semi-transparent with colorful blocks 
      </description> 
      <stock>6</stock> 
      <imagesource>images/series/tbbt/products/curtain.jpg</imagesource> 
     </product> 
</products> 

на моем HTML-страницу с помощью Ajax

+0

посмотреть в xslt, чтобы сделать html из xml – dandavis

+0

Вам нужно отобразить 'XML' или« штук », представленных XML? –

ответ

0

С this post обертке все ваши XML в текстовой области тег

<textarea style="border:none;">..XML Here..</textarea> 

Это не имеет границ и TEXTAREA воны 'обрабатывать xml как разметку только чистым текстом.

+0

это не работало чувак: T –

+0

@BassamFoaud Он работал на op этого вопроса, увидев скрипку http://jsfiddle.net/y9fqf/1/ – t3dodson

Смежные вопросы