Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

XPATH How do I extract value of data-amzn attribute?

$
0
0

Hello,

I have XML document below, I need to extract value of attribute called "data-amzn" of <DIV> element, and attribute SRC of IMG element inside?

<article id="post-123769" class="post-123769 post type-post status-publish format-standard hentry category-children-books-kids tag-a-j-cosmo post clearfix "><div class="post-inner"><div class="amazon" data-amzn="http://www.amazon.com/dp/B00AMSUCTE"> <p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span typeof="v:Breadcrumb"><a href="http://hundredzeros.com" rel="v:url" property="v:title">Kindle Books</a></span> &raquo; <span typeof="v:Breadcrumb"><a href="http://hundredzeros.com/children-books-kids" rel="v:url" property="v:title">Children eBooks</a></span> &raquo; <span typeof="v:Breadcrumb"><span class="breadcrumb_last" property="v:title">A Bear of a Christmas</span></span></span></p> <figure class="post-image right"> <a class="amzn"><img src="http://ecx.images-amazon.com/images/I/51hY76WXCuL.jpg" /></a> </figure> <div class="post-content"> 
article id="post-123769" class="post-123769 post type-post status-publish format-standard hentry category-children-books-kids tag-a-j-cosmo post clearfix "><div class="post-inner">



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>