コード例 #1
0
        private void ProcessNode(XmlNodeInformation xni)
        {
            if (xni.NodeType == NodeType.content)
            {
                if (inInstruction && !passedInstruction)
                    instructionText.Append(xni.ContentValue);

                if (passedInstruction && !inInstruction)
                    resultText.Append(xni.ContentValue);

                return;
            }

            if (!xni.IsInNamespace(NamespaceId.w))
                return; // not interested

            if (xni.Is(NamespaceId.w, "instrText"))
            {
                inInstruction = xni.NodeType == NodeType.start;
            }

            if (xni.Is(NamespaceId.w, "fldChar"))
            {
                ProcessFldChar(xni.GetAttributeValue("fldCharType"));
                passedInstruction = true;
            }
        }