views:

34

answers:

2

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 :)

A: 

Linq to XML

http://www.hookedonlinq.com/LINQtoXML5MinuteOverview.ashx

klabranche
@Klabranche - thanks. I've looked at that. Have you ever used PHP's simplexml method? Do you have a small example to show?
Marshall
A: 

You'll want to use the .Net XML namespace and XMLDocument class:

http://www.c-sharpcorner.com/uploadfile/mahesh/readwritexmltutmellli2111282005041517am/readwritexmltutmellli21.aspx

brendan
@brendan - thanks. I've also seen this site. Have you ever used PHP's simplexml? Also, do you have a small example to show the use?
Marshall