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