If I want to convert my PHP application to ASP.NET… what do you recommend and why?
I'm currently using PHP's simplexml_load_string() method because it's, well, …simple.
For example, for PHP to process an http request in the form of XML I just use:
$FILERAWDATA = file_get_contents("php://input");
$xml = simplexml_load_string($FILERAWDATA);
Then grab the values from the xml nodes like such:
@$itemid = $xml->itemid;
// then use the node value as a PHP var $itemid
So, does ASP.NET have anything similar?
Thanks for reading.
AlejandroConsueloRodriguezMiguel -- also known as Fred :)
is this what you are lookin for ?
Dim xml As New XmlDocument()
xml.LoadXml(SomeXMLString)
Dim itemID as String = xml.GetElementsByTagName("itemID")(0).InnerText
this assumes that there is only one ItemID -> (0) first
You'll want to use the .Net XML namespace and XMLDocument class:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.