Last post Feb 09, 2016 03:29 PM by Li Wang
Feb 09, 2016 11:11 AM|kavithma.fernando|LINK
I have a xml file like belowm
<?xml version="1.0" encoding="UTF-8"?>
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
and i wanted to create a web api end point to accept the above xml and save it in a local drive as a xml file. also if i can do some validation on xml beofore I accept this in web api side that would be really great,
could some one direct me in to the right approach to do this ?
Feb 09, 2016 03:29 PM|Li Wang|LINK
to accept the above xml and save it in a local drive as a xml file.
We could accept string value and parse it to xml.
XDocument xml = XDocument.Parse(text);
also if i can do some validation on xml beofore I accept this in web api side that would be really great,
Use custom validation to validate it.