Uri accept bad url that start with "www-"

时间:2015-05-08 09:59:35

标签: c# uri

I'm using this code block:

<terminationDate>2015-05-07</terminationDate>

And the function Uri.TryCreate returns true, instead of false. However that URL is broken because: "www-" is not valid prefix.

Can someone explain this?

1 个答案:

答案 0 :(得分:3)

$(".fancybox") is as valid as <?php $myXMLData = '<field name="expertise" type="multilist" label="Area of Expertise"> <option value="Disaster Management">Disaster Management </option> <option value="Energy Security">Energy Security </option> <optgroup label="Environment"> <option value="Climate">Climate </option> <option value="Resource Security">Resource Security </option> </optgroup> </field>'; $xml=simplexml_load_string($myXMLData); print_r($xml);

If this adress exists is a different question.