<img src="images/img2.jpg" alt="Cinderella" title="" />
I am getting image -> "src" value & getting the image & converting to Base64 string. Apart from this I want to replace value of src(images/img2.jpg) with base64 string value. But I am unable find the possible way.
Here is my total code(getting image "src" value & converting to string)
XmlNodeList names = doc.GetElementsByTagName("img");
for (uint j = 0; j < names.Length; j++)
{
XmlElement ele = (XmlElement)names.Item(j);
var attri = ele.Attributes;
var attrilist = attri.ToArray();
//XmlElement name = names.ElementAt("src");
for (int i = 0; i < attrilist.Length; i++)
{
if (attrilist[i].NodeName == "src")
{
foreach (var itme in attrilist)
{
var srcval = attrilist.ToArray();
foreach (var srcvl in srcval)
{
var split = srcvl.NodeValue.ToString().Split('/');
StorageFile file = await appfolder.GetFileAsync(split.Last());
//converting image
}
}
I am unable to fetch the place of the "src" location in html file
Any help required.