Solution: How to get the InnerText value of a node when using XmlDataSource
1 min read
Lets say you have this xml:
Blog Content
And you are using an XmlDataSource to run it through a repeater.
You can easily get the attributes like so: <%#Eval(“Date”)%>
To get the innerText (the blog content) one option is to use the XPath operator like so: <%# XPath(”.”) %>
Share:
Share on LinkedIn
Quick Share: Your custom post text has been copied to your clipboard! Click the button below to open LinkedIn's share dialog, then paste it.
💡 Tip: LinkedIn will open in a new tab. Use Ctrl+V (or Cmd+V on Mac) to paste your text.
Note: LinkedIn will show the article preview. You can add your custom text above it.