iTextSharp.tool.xml.XMLWorker.EndElement C# (CSharp) Method

EndElement() public method

public EndElement ( String tag, String ns ) : void
tag String
ns String
return void
        public void EndElement(String tag, String ns)
        {
            String thetag = null;
            if (parseHtml) {
                thetag = tag.ToLowerInvariant();
            } else {
                thetag = tag;
            }
            IWorkerContext ctx = GetLocalWC();
            if (null != ctx.GetCurrentTag() && !thetag.Equals(ctx.GetCurrentTag().Name)) {
                throw new RuntimeWorkerException(String.Format(
                        LocaleMessages.GetInstance().GetMessage(LocaleMessages.INVALID_NESTED_TAG), thetag,
                        ctx.GetCurrentTag().Name));
            }
            IPipeline wp = rootpPipe;
            ProcessObject po = new ProcessObject();
            try {
                while (null != (wp = wp.Close(ctx, ctx.GetCurrentTag(), po)))
                    ;
            } catch (PipelineException e) {
                throw new RuntimeWorkerException(e);
            } finally {
                if (null != ctx.GetCurrentTag())
                    ctx.SetCurrentTag(ctx.GetCurrentTag().Parent);
            }
        }