3
让我们在我的C#代码,说我已经取回从的XmlDocument(或的XDocument)一的XmlElement(或的XElement)。如何在XML文件中获取此XmlElement的字符位置?如何获取XmlElement的字符位置?
换句话说,我要告诉
"Your element starts on the 176th character in the text file containing the XML",
不
"Your 'book' element is the 3rd 'book' element in the whole XML document".
您还必须生效,最有可能忽略空白。这可能是你可以得到的最好的。 – Xaisoft 2011-06-08 01:40:45
@ Xaisoft - 不,空格不会被忽略。 – 2011-06-08 01:44:31
非常感谢Alex! – 2011-06-11 05:10:33