当前位置: 首页>>代码示例>>C#>>正文


C# XmlBContext.skipTill方法代码示例

本文整理汇总了C#中XmlBooster.XmlBContext.skipTill方法的典型用法代码示例。如果您正苦于以下问题:C# XmlBContext.skipTill方法的具体用法?C# XmlBContext.skipTill怎么用?C# XmlBContext.skipTill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlBooster.XmlBContext的用法示例。


在下文中一共展示了XmlBContext.skipTill方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: parseBody

        /// <remarks>This method is used by XMLBooster-generated code
        /// internally. Please refrain from using it, as it
        /// might produce unexpected results, and might change
        /// or even disappear in the future.</remarks>
        public override void parseBody(XmlBContext ctxt)
        {
            #pragma warning disable 0168, 0219
            int indicator=0;
            char quoteChar;
             string  tempStr;
            #pragma warning restore 0168, 0219
            bool fl1125;
            bool fl1126;
            RuleCondition fl1128;

            ctxt.skipWhiteSpace();
            base.parseBody(ctxt);
            ctxt.skipWhiteSpace();
            // Optional Enclosed
            if (ctxt.lookAheadOpeningTag("<SubRules")){
            ctxt.skipWhiteSpace();
            fl1125 = true ;
            while (fl1125) { // BeginLoop
            ctxt.skipWhiteSpace();
            if (ctxt.isAlNum()){
            ctxt.skipTill ('=');
            ctxt.advance();
            ctxt.skipWhiteSpace();
            quoteChar = ctxt.acceptQuote();
            ctxt.skipTill (quoteChar);
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            } else {
            fl1125 = false ;
            } // If
            } // While
            ctxt.accept('>');
            // Indicator
            // Parse PC data
            acceptor.lAcceptPcData(ctxt, 0, '<', XmlBContext.WS_PRESERVE);
            // Regexp
            ctxt.skipWhiteSpace();
            ctxt.acceptString ("</SubRules>");
            } // If
            // End enclosed
            ctxt.skipWhiteSpace();
            // Optional Enclosed
            if (ctxt.lookAheadOpeningTag("<Conditions")){
            ctxt.skipWhiteSpace();
            fl1126 = true ;
            while (fl1126) { // BeginLoop
            ctxt.skipWhiteSpace();
            if (ctxt.isAlNum()){
            ctxt.skipTill ('=');
            ctxt.advance();
            ctxt.skipWhiteSpace();
            quoteChar = ctxt.acceptQuote();
            ctxt.skipTill (quoteChar);
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            } else {
            fl1126 = false ;
            } // If
            } // While
            if (ctxt.current() == '/'){
            ctxt.advance();
            ctxt.accept('>');
            } else {
            ctxt.accept('>');
            // Repeat
            ctxt.skipWhiteSpace();
            fl1128 = null;
            while(ctxt.lookAheadOpeningTag ("<RuleCondition")) {
            fl1128 = acceptor.lAccept_RuleCondition(ctxt, "</RuleCondition>");
            appendConditions(fl1128);
            ctxt.skipWhiteSpace();
            } // -- monomorphic Loop
            // EndRepeat
            ctxt.skipWhiteSpace();
            ctxt.acceptString ("</Conditions>");
            } // If
            } // If
            // End enclosed
            ctxt.skipWhiteSpace();
        }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:85,代码来源:DataDictionary.Generated.cs

示例2: parse


//.........这里部分代码省略.........
            indicator = 914;
            } else {
            indicator = 916;
            } // If
            break;
            } // Case
            case 'G':
            {
            ctxt.advance();
            if (ctxt.lookAheadString("uid=")){
            indicator = 912;
            } else {
            indicator = 916;
            } // If
            break;
            } // Case
            default:
            indicator = 916;
            break;
            } // Switch
            switch (indicator) {
            case 911: {
            // Handling attribute Name
            // Also handles alien attributes with prefix Name
            if (fl911){
            ctxt.fail ("Duplicate attribute: Name");
            } // If
            fl911 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setName((acceptor.lAcceptPcData(ctxt,-1, quoteChar, XmlBContext.WS_PRESERVE)));
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 912: {
            // Handling attribute Guid
            // Also handles alien attributes with prefix Guid
            if (fl912){
            ctxt.fail ("Duplicate attribute: Guid");
            } // If
            fl912 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setGuid((acceptor.lAcceptPcData(ctxt,-1, quoteChar, XmlBContext.WS_PRESERVE)));
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 913: {
            // Handling attribute Updates
            // Also handles alien attributes with prefix Updates
            if (fl913){
            ctxt.fail ("Duplicate attribute: Updates");
            } // If
            fl913 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setUpdates((acceptor.lAcceptPcData(ctxt,-1, quoteChar, XmlBContext.WS_PRESERVE)));
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            case 914: {
            // Handling attribute IsRemoved
            // Also handles alien attributes with prefix IsRemoved
            if (fl914){
            ctxt.fail ("Duplicate attribute: IsRemoved");
            } // If
            fl914 = true ;
            quoteChar = ctxt.acceptQuote();
            this.setIsRemoved(acceptor.lAcceptBoolean(ctxt));
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            break;
            } // End of dispatch label
            // Final default label
            case 916: {
            // Taking ignorable attributes into account
            if (ctxt.isAlNum()){
            ctxt.skipTill ('=');
            ctxt.advance();
            ctxt.skipWhiteSpace();
            quoteChar = ctxt.acceptQuote();
            ctxt.skipTill (quoteChar);
            ctxt.accept(quoteChar);
            ctxt.skipWhiteSpace();
            } else {
            if (!fl914){
            this.setIsRemoved( false);
            } // If
            fl915 = false ;
            } // If
            break;
            } // End of dispatch label
            } // Dispatch
            } // While
            }
            ctxt.skipWhiteSpace();
            ctxt.accept('>');
            parseBody(ctxt);
            ctxt.acceptString(endingTag);
        }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:101,代码来源:DataDictionary.Generated.cs

示例3: lAcceptPcData

        /// <summary>Utility function which parse a PCDATA component 
        /// from a context. It takes the entities defined in the
        /// in the configuration into account.</summary>
        /// <param name="ctxt">the context from which the data must be 
        ///        parsed</param>
        /// <param name="maxLen">the maximal number of characters that 
        ///        can be read.</param>
        /// <param name="closingCh">a character on which parsing must stop
        ///        in addition to the standard &lt; character.</param>
        /// <param name="wsMode">indicates PRESERVE (default), REPLACE or COLLAPSE.</param>
        public static string lAcceptPcData(XmlBContext ctxt, 
                                   int maxLen,
                                   char closingCh,
                                   int wsMode)
        {
            char ch;
            char lastch = '.';
            System.Text.StringBuilder buff;
             string  res;

              buff = new System.Text.StringBuilder();
              bool go_on = true;
              while (go_on)
            {
              go_on = false;
              while ((ctxt.current() != '<') && (ctxt.current() != closingCh)) // while 1
            {
            ch = ctxt.current();
            ctxt.advance();
            if (ch == '&'){
            ch = lAcceptPcDataChr(ctxt);
            } else {
            if (wsMode >= WS_REPLACE){
            if (ch == '\t' || ch == '\n' || ch == '\r'){
            ch = ' ';
            } // If
            if (wsMode == WS_COLLAPSE){
            if ((ch == ' ') && ((lastch == ' ') || (buff.Length == 0))){
            ch = (char)0;
            } else {
            lastch = ch;
            } // If
            } else {
            lastch = ch;
            } // If
            } // If
            } // If
            if (ch != '\0'){
            buff.Append (ch);
            } // If
            }
            // end while
            if (ctxt.current() == '<'){
            if (ctxt.lookAheadString("<![CDATA[")){
             string  cdata = ctxt.acceptUntil("]]>", true);
            buff.Append (cdata);
            go_on = true;
            } else {
            if (ctxt.lookAhead2('<','?')){
            ctxt.skipTill ('?');
            ctxt.accept2('?','>');
            go_on = true;
            } else {
            } // If
            } // If
            } // If
            }
            if (wsMode == WS_COLLAPSE && lastch == ' ' && buff. Length > 0){
            res = buff.ToString (0, buff.Length -1);
            } else {
            res = buff.ToString();
            } // If
            if ((maxLen > 0) && (res.Length > maxLen)){
            ctxt.recoverableFail ("Maximum length exceeded");
            } // If
            return res;
        }
开发者ID:GautierBerck,项目名称:ERTMSFormalSpecs,代码行数:77,代码来源:DataDictionary.Generated.cs


注:本文中的XmlBooster.XmlBContext.skipTill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。