本文整理汇总了C#中System.Xml.XPath.XPathNavigator.CreateReader方法的典型用法代码示例。如果您正苦于以下问题:C# XPathNavigator.CreateReader方法的具体用法?C# XPathNavigator.CreateReader怎么用?C# XPathNavigator.CreateReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XPath.XPathNavigator
的用法示例。
在下文中一共展示了XPathNavigator.CreateReader方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AppendChild
public virtual void AppendChild(XPathNavigator newChild)
{
if (newChild == null)
{
throw new ArgumentNullException("newChild");
}
if (!this.IsValidChildType(newChild.NodeType))
{
throw new InvalidOperationException(Res.GetString("Xpn_BadPosition"));
}
XmlReader reader = newChild.CreateReader();
this.AppendChild(reader);
}
示例2: InsertBefore
public virtual void InsertBefore(XPathNavigator newSibling)
{
if (newSibling == null)
{
throw new ArgumentNullException("newSibling");
}
if (!this.IsValidSiblingType(newSibling.NodeType))
{
throw new InvalidOperationException(Res.GetString("Xpn_BadPosition"));
}
XmlReader reader = newSibling.CreateReader();
this.InsertBefore(reader);
}
示例3: InsertAfter
public virtual void InsertAfter(XPathNavigator newSibling)
{
if (newSibling == null)
{
throw new ArgumentNullException("newSibling");
}
if (!IsValidSiblingType(newSibling.NodeType))
{
throw new InvalidOperationException(SR.Xpn_BadPosition);
}
XmlReader reader = newSibling.CreateReader();
InsertAfter(reader);
}
示例4: ReplaceSelf
public virtual void ReplaceSelf(XPathNavigator newNode)
{
if (newNode == null)
{
throw new ArgumentNullException("newNode");
}
XmlReader reader = newNode.CreateReader();
this.ReplaceSelf(reader);
}
示例5: PrependChild
public virtual void PrependChild(XPathNavigator newChild)
{
if (newChild == null)
{
throw new ArgumentNullException("newChild");
}
if (!IsValidChildType(newChild.NodeType))
{
throw new InvalidOperationException(SR.Xpn_BadPosition);
}
XmlReader reader = newChild.CreateReader();
PrependChild(reader);
}