C# Saved Program: quiescent-dog

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


using System;
using System.Xml;

public class Test
{
	public static void Main()
	{
		var xmlb64 = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzb2FwOkVudmVsb3BlIHhtbG5zOnNvYXA9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3NvYXAvZW52ZWxvcGUvIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIj4NCiAgICA8c29hcDpCb2R5Pg0KICAgICAgICA8R2V0U3ViamVjdExpc3RCeUFjY291bnRDb2RlUmVzcG9uc2UgeG1sbnM9Imh0dHA6Ly9wb3VuZHNsYWJzL2lscyI+DQogICAgICAgICAgICA8R2V0U3ViamVjdExpc3RCeUFjY291bnRDb2RlUmVzdWx0Pg0KICAgICAgICAgICAgICAgIDxTdWJqZWN0Pg0KICAgICAgICAgICAgICAgICAgICA8U3Vic2NyaWJlcktleT4xMDIxNjI8L1N1YnNjcmliZXJLZXk+DQogICAgICAgICAgICAgICAgICAgIDxTdHVkZW50SUQ+MTAyMTYyPC9TdHVkZW50SUQ+DQogICAgICAgICAgICAgICAgICAgIDxTdHVkZW50TG9jYXRvciAvPg0KICAgICAgICAgICAgICAgICAgICA8QWNjb3VudFR5cGU+U1RVREVOVDwvQWNjb3VudFR5cGU+DQogICAgICAgICAgICAgICAgICAgIDxGaXJzdE5hbWU+TmF0aGFuPC9GaXJzdE5hbWU+DQogICAgICAgICAgICAgICAgICAgIDxMYXN0TmFtZT5HYXlsZTwvTGFzdE5hbWU+DQogICAgICAgICAgICAgICAgICAgIDxHcmFkZSAvPg0KICAgICAgICAgICAgICAgICAgICA8VGVhY2hlcj4iTWlsbGVyPC9UZWFjaGVyPg0KICAgICAgICAgICAgICAgICAgICA8RW1haWwgLz4NCiAgICAgICAgICAgICAgICAgICAgPFRva2VuPjE3MTgwMDAxNzEwNDY8L1Rva2VuPg0KICAgICAgICAgICAgICAgICAgICA8TW9iaWxlIC8+DQogICAgICAgICAgICAgICAgICAgIDxTY2hvb2xOYW1lPlRlc3QgU2Nob29sIEE8L1NjaG9vbE5hbWU+DQogICAgICAgICAgICAgICAgICAgIDxTY2hvb2xJRD4xMDEwPC9TY2hvb2xJRD4NCiAgICAgICAgICAgICAgICAgICAgPFNjaG9vbFRlcnJpdG9yeSAvPg0KICAgICAgICAgICAgICAgICAgICA8RGVmYXVsdFN0dWRpbyAvPg0KICAgICAgICAgICAgICAgICAgICA8U2Nob29sWWVhcj4xNzE4PC9TY2hvb2xZZWFyPg0KICAgICAgICAgICAgICAgICAgICA8RXZlbnRJRD4zNDwvRXZlbnRJRD4NCiAgICAgICAgICAgICAgICAgICAgPE9yZGVyRGVhZGxpbmVEYXRlIC8+DQogICAgICAgICAgICAgICAgICAgIDxQcmltYXJ5V2VicGF0aCAvPg0KICAgICAgICAgICAgICAgICAgICA8VGVhbVdlYnBhdGggLz4NCiAgICAgICAgICAgICAgICAgICAgPERlcGFydG1lbnQgLz4NCiAgICAgICAgICAgICAgICA8L1N1YmplY3Q+DQogICAgICAgICAgICAgICAgPFN1YmplY3Q+DQogICAgICAgICAgICAgICAgICAgIDxTdWJzY3JpYmVyS2V5PjEwMjE2MzwvU3Vic2NyaWJlcktleT4NCiAgICAgICAgICAgICAgICAgICAgPFN0dWRlbnRJRD4xMDIxNjM8L1N0dWRlbnRJRD4NCiAgICAgICAgICAgICAgICAgICAgPFN0dWRlbnRMb2NhdG9yIC8+DQogICAgICAgICAgICAgICAgICAgIDxBY2NvdW50VHlwZT5TVFVERU5UPC9BY2NvdW50VHlwZT4NCiAgICAgICAgICAgICAgICAgICAgPEZpcnN0TmFtZT5DaHJpc3R5YW48L0ZpcnN0TmFtZT4NCiAgICAgICAgICAgICAgICAgICAgPExhc3ROYW1lPkNvbG9uPC9MYXN0TmFtZT4NCiAgICAgICAgICAgICAgICAgICAgPEdyYWRlIC8+DQogICAgICAgICAgICAgICAgICAgIDxUZWFjaGVyPiJNaWxsZXI8L1RlYWNoZXI+DQogICAgICAgICAgICAgICAgICAgIDxFbWFpbCAvPg0KICAgICAgICAgICAgICAgICAgICA8VG9rZW4+MTcxODAwMDE1MzA0MTwvVG9rZW4+DQogICAgICAgICAgICAgICAgICAgIDxNb2JpbGUgLz4NCiAgICAgICAgICAgICAgICAgICAgPFNjaG9vbE5hbWU+VGVzdCBTY2hvb2wgQTwvU2Nob29sTmFtZT4NCiAgICAgICAgICAgICAgICAgICAgPFNjaG9vbElEPjEwMTA8L1NjaG9vbElEPg0KICAgICAgICAgICAgICAgICAgICA8U2Nob29sVGVycml0b3J5IC8+DQogICAgICAgICAgICAgICAgICAgIDxEZWZhdWx0U3R1ZGlvIC8+DQogICAgICAgICAgICAgICAgICAgIDxTY2hvb2xZZWFyPjE3MTg8L1NjaG9vbFllYXI+DQogICAgICAgICAgICAgICAgICAgIDxFdmVudElEPjM0PC9FdmVudElEPg0KICAgICAgICAgICAgICAgICAgICA8T3JkZXJEZWFkbGluZURhdGUgLz4NCiAgICAgICAgICAgICAgICAgICAgPFByaW1hcnlXZWJwYXRoIC8+DQogICAgICAgICAgICAgICAgICAgIDxUZWFtV2VicGF0aCAvPg0KICAgICAgICAgICAgICAgICAgICA8RGVwYXJ0bWVudCAvPg0KICAgICAgICAgICAgICAgIDwvU3ViamVjdD4NCiAgICAgICAgICAgIDwvR2V0U3ViamVjdExpc3RCeUFjY291bnRDb2RlUmVzdWx0Pg0KICAgICAgICA8L0dldFN1YmplY3RMaXN0QnlBY2NvdW50Q29kZVJlc3BvbnNlPg0KICAgIDwvc29hcDpCb2R5Pg0KPC9zb2FwOkVudmVsb3BlPg==";
		var xml = new XmlDocument();
        xml.LoadXml(Convert.FromBase64String(xmlb64).ToString().Trim());
        var xmlns = new XmlNamespaceManager(xml.NameTable);
        xmlns.AddNamespace("badns", "http://poundslabs/ils");
        try
        {
        	var subjects = xml.SelectNodes("//badns:Subject", xmlns);
        	Console.WriteLine(subjects[0].ToString());
        }
        catch(Exception ex)
        {
        	Console.WriteLine(ex.ToString());
        }
	}	
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs