System.Xml.Xsl.XsltOld.Processor.CopyBeginEvent C# (CSharp) Method

CopyBeginEvent() private method

private CopyBeginEvent ( XPathNavigator node, bool emptyflag ) : bool
node XPathNavigator
emptyflag bool
return bool
        internal bool CopyBeginEvent(XPathNavigator node, bool emptyflag) {
            switch (node.NodeType) {
            case XPathNodeType.Element:
            case XPathNodeType.Attribute:
            case XPathNodeType.ProcessingInstruction:
            case XPathNodeType.Comment:
                return BeginEvent(node.NodeType, node.Prefix, node.LocalName, node.NamespaceURI, emptyflag);
            case XPathNodeType.Namespace:
                // value instead of namespace here!
                return BeginEvent(XPathNodeType.Namespace, null, node.LocalName, node.Value, false);
            case XPathNodeType.Text:
                // Text will be copied in CopyContents();
                break;

            case XPathNodeType.Root:
            case XPathNodeType.Whitespace:
            case XPathNodeType.SignificantWhitespace:
            case XPathNodeType.All:
                break;

            default:
                Debug.Fail("Invalid XPathNodeType in CopyBeginEvent");
                break;
            }

            return true;
        }

Usage Example

 private static bool SendBeginEvent(Processor processor, XPathNavigator node) {
     return processor.CopyBeginEvent(node, node.IsEmptyElement);
 }
All Usage Examples Of System.Xml.Xsl.XsltOld.Processor::CopyBeginEvent