상속: VTDNav
예제 #1
0
 /**
  * Clone the VTDNav instance to get with shared XML, VTD and LC buffers
  * The node position is also copied from the original instance
  * @return a new instance of VTDNav
  */
 public override VTDNav cloneNav()
 {
     VTDNav_L5 vn = new VTDNav_L5(rootIndex,
             encoding,
             ns,
             nestingLevel - 1,
             XMLDoc,
             vtdBuffer,
             l1Buffer,
             l2Buffer,
             l3Buffer,
             l4Buffer,
             l5Buffer,
             docOffset,
             docLen
             );
     vn.atTerminal = this.atTerminal;
     vn.LN = this.LN;
     if (this.context[0] != -1)
         Array.Copy(this.context, 0, vn.context, 0, this.context[0] + 1);
     else
         vn.context[0] = -1;
     vn.l1index = l1index;
     if (getCurrentDepth() > 1)
     {
         vn.l2index = this.l2index;
         vn.l2upper = l2upper;
         vn.l2lower = l2lower;
     }
     if (getCurrentDepth() > 2)
     {
         vn.l3lower = l3lower;
         vn.l3index = l3index;
         vn.l3upper = l3upper;
     }
     if (getCurrentDepth() > 3)
     {
         vn.l4lower = l4lower;
         vn.l4index = l4index;
         vn.l4upper = l4upper;
     }
     if (getCurrentDepth() > 4)
     {
         vn.l5lower = l5lower;
         vn.l5index = l5index;
         vn.l5upper = l5upper;
     }
     return vn;
 }
예제 #2
0
파일: VTDGen.cs 프로젝트: DuLerWeil/vtd-xml
 /// <summary> The entity aware version of getCharAfterS</summary>
 /// <returns> int
 /// </returns>
 /// <throws>  ParseException Super class for any exception during parsing. </throws>
 /// <throws>  EncodingException UTF/native encoding exception. </throws>
 /// <throws>  com.ximpleware.EOFException End of file exception. </throws>
 //private int CharAfterSe
 //{
 //    get
 //    {
 //        int n = 0;
 //        int temp; //offset saver
 //        while (true)
 //        {
 //            n = r.Char;
 //            if (!XMLChar.isSpaceChar(n))
 //            {
 //                if (n != '&')
 //                    return n;
 //                else
 //                {
 //                    temp = offset;
 //                    if (!XMLChar.isSpaceChar(entityIdentifier()))
 //                    {
 //                        offset = temp; // rewind
 //                        return '&';
 //                    }
 //                }
 //            }
 //        }
 //    }
 //}
 /// <summary> This method returns the VTDNav object after parsing, it also cleans 
 /// internal state so VTDGen can process the next file.
 /// </summary>
 /// <returns> com.ximpleware.VTDNav
 /// </returns>
 public VTDNav getNav()
 {
     // call VTDNav constructor
     VTDNav vn;
     if (shallowDepth)
         vn = new VTDNav(rootIndex, encoding, ns, VTDDepth,
                 new UniByteBuffer(XMLDoc), VTDBuffer, l1Buffer, l2Buffer,
                 l3Buffer, docOffset, docLen);
     else
         vn = new VTDNav_L5(rootIndex, encoding, ns, VTDDepth,
                 new UniByteBuffer(XMLDoc), VTDBuffer, l1Buffer, l2Buffer,
                 _l3Buffer, _l4Buffer, _l5Buffer, docOffset, docLen);
     clear();
     return vn;
 }