Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ MoveToNamespace()

bool System.Xml.XPathNodePointer.MoveToNamespace ( string name)
inlinepackage

Definition at line 1281 of file XPathNodePointer.cs.

1282 {
1283 _parentOfNS = _node as XmlBoundElement;
1284 if (_parentOfNS == null)
1285 {
1286 return false;
1287 }
1288 string text = name;
1289 if (text == "xmlns")
1290 {
1291 text = "xmlns:xmlns";
1292 }
1293 if (text != null && text.Length == 0)
1294 {
1295 text = "xmlns";
1296 }
1297 RealFoliate();
1298 XmlNode xmlNode = _node;
1299 XmlAttribute xmlAttribute = null;
1300 XmlBoundElement xmlBoundElement = null;
1301 while (xmlNode != null)
1302 {
1303 if (xmlNode is XmlBoundElement xmlBoundElement2)
1304 {
1305 if (xmlBoundElement2.IsFoliated)
1306 {
1307 xmlAttribute = xmlBoundElement2.GetAttributeNode(name, "http://www.w3.org/2000/xmlns/");
1308 if (xmlAttribute != null)
1309 {
1311 return true;
1312 }
1313 }
1314 else
1315 {
1317 if (row == null)
1318 {
1319 return false;
1320 }
1322 {
1323 if (dataColumn.Namespace == "http://www.w3.org/2000/xmlns/" && dataColumn.ColumnName == name)
1324 {
1326 return true;
1327 }
1328 }
1329 }
1330 }
1331 do
1332 {
1333 xmlNode = xmlNode.ParentNode;
1334 }
1335 while (xmlNode != null && xmlNode.NodeType != XmlNodeType.Element);
1336 }
1337 _parentOfNS = null;
1338 return false;
1339 }
DataColumn PreviousColumn(DataRow row, DataColumn col, bool fAttribute)
bool MoveTo(XPathNodePointer pointer)

References System.Xml.XmlNode.NodeType, System.Xml.XmlNode.ParentNode, and System.text.

Referenced by System.Xml.DataDocumentXPathNavigator.MoveToNamespace().