Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Testing 008
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Xml; namespace Rextester { public class Program { public static void Main(string[] args) { //String xmlstring = "<?xml version=\"1.0\" encoding=\"utf-8\"?> <settings> <source>H:\\Prueba 1</source> <target>H:\\Prueba 2</target> </settings>"; String xmlstring = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>"; XmlDocument doc = new XmlDocument(); doc.LoadXml(xmlstring); /* XmlNode sourceNode = doc.DocumentElement.SelectSingleNode("/settings/source"); string source = sourceNode.InnerText; Console.WriteLine(source); XmlNode targetNode = doc.DocumentElement.SelectSingleNode("/settings/target"); string target = targetNode.InnerText; Console.WriteLine(target); */ XmlNode noteNode = doc.DocumentElement.SelectSingleNode("/note"); int note = noteNode.ChildNodes.Count; Console.WriteLine("Hijos: "+note); Console.WriteLine(""); XmlNode toNode = doc.DocumentElement.SelectSingleNode("/note/to"); string to = toNode.InnerText; Console.WriteLine(to); XmlNode fromNode = doc.DocumentElement.SelectSingleNode("/note/from"); string from = fromNode.InnerText; Console.WriteLine(from); XmlNode headingNode = doc.DocumentElement.SelectSingleNode("/note/heading"); string heading = headingNode.InnerText; Console.WriteLine(heading); XmlNode bodyNode = doc.DocumentElement.SelectSingleNode("/note/body"); string body = bodyNode.InnerText; Console.WriteLine(body); } } }
run
|
edit
|
history
|
help
0
Ship! Wall
Left circular rotation of an array
test
math 10.97
Find the integers which squares sum gives the prime numbers of the form (4k + 1).
Binary Search Recursive
Cs
Out reference example
program
a