Here is the XML file :
<book_info>
<book title = "Peter Pan">
<publisher name="Penguin" edition="2nd" date ="2/6/2016" />
<Page size= "207" />
<author name = "J M Barrie"/>
<info genre = "novel" lang = "English"/>
</book>
<book title = "Room of Many Color">
<publisher name="Penguin" edition="1st" date ="3/11/2000" />
<Page size= "387" />
<author name = "Ruskin Bond"/>
<info genre = "sort stories" lang = "English"/>
</book>
</book_info>
Here is how I am trying to access the publisher name :
bookXML := CreateOleObject('Msxml2.DOMDocument.6.0');
bookXML.async := False;
bookXML.load(ExpandConstant('{tmp}\book.xml'));
bookNode := bookXML.SelectSingleNode('//book_info/book[name/text()=' + bookName + ']');
bookPubName := bookNode.SelectSingleNode('publisher[name]').text;
But it is always giving NIL interface exception for the last line.
bookPubName := bookNode.SelectSingleNode('publisher[name]').text;
I checked How to select XML tag based on value of its child tag in Inno Setup but could not resolve.