我需要解析xml中的值并将其放置到image的src字段中。
我尝试将其解析为$(".photoBox img").append(ImageSmURL);
我得到了
<img src="" alt="">/FLPM/media/images/0E7Q9Z0C_sm.jpg/FLPM/media/images/2A9L1V2X_sm.jpg</img>
我该怎么做,结果将是......
<img src="/FLPM/media/images/0E7Q9Z0C_sm.jpg" alt="" />
我的xml
<Images>
<ImageID id="63">
<ImageSmURL>/FLPM/media/images/5V2G4Q5S_sm.jpg</ImageSmURL>
<ImageLgURL>/FLPM/media/images/5V2G4Q5S.jpg</ImageLgURL>
</ImageID>
<ImageID id="64">
<ImageSmURL>/FLPM/media/images/5Y2K4T5V_sm.jpg</ImageSmURL>
<ImageLgURL>/FLPM/media/images/5Y2K4T5V.jpg</ImageLgURL>
</ImageID>
</Images>