XML 데이터를 txt 파일이 아닌 문자열에서 가져 오려고합니다. 작동 방식 :문자열에서 XML 데이터 구문 분석
// xmlData.txt contains < m t='Hello' u='1337' />
XmlReader config = new XmlTextReader("../../xmldata.txt");
config.Read();
Console.WriteLine("Data: " + config.GetAttribute("t"));
하지만 문서가 아닌 문자열에서 구문 분석하고 싶습니다.
문자열에서 XML 데이터를 구문 분석하려면 어떻게합니까?
을, 당신은 System.Xml.Linq.XDocument.Parse ("문자열 ...") – Crowcoder