Có ai có thể cung cấp ví dụ về việc sử dụng hàm XmlDocument.SelectSingleNodeNS cho WinRT không? Tôi không rõ thông số thứ hai là gì và tôi không thể tìm thấy ví dụ.Định dạng nào được mong đợi bởi tham số không gian tên trong SelectSingleNodeNS
public IXmlNode SelectSingleNodeNS(
string xpath,
object namespaces
)
Contains a string that specifies the namespaces to use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.
Không, không có hình phạt về hiệu suất. Hãy xem về vấn đề này [phản ứng] [1] [1]: http://stackoverflow.com/questions/256859/is-there-a-performance-difference-between-a -cho-loop-và-a-cho-mỗi-vòng lặp –