3 writes to top
System.Xml (3)
System\Xml\Core\XmlTextWriter.cs (3)
254top = 0;// 0 is an empty sentanial element 1126top--; 1454top++; // Move up stack
48 references to top
System.Xml (48)
System\Xml\Core\XmlTextWriter.cs (48)
255stack[top].Init( -1 ); 424stack[top].defaultNs = stack[top-1].defaultNs; 425if (stack[top-1].defaultNsState != NamespaceState.Uninitialized) 426stack[top].defaultNsState = NamespaceState.NotDeclaredButInScope; 427stack[top].mixed = stack[top-1].mixed; 455stack[top].prefix = null; 457stack[top].prefix = prefix; 467stack[top].name = localName; 874if (ns != null && ns.Length != 0 && ns != stack[top].defaultNs) { 906if (s == null && ns == stack[top].defaultNs) { 915for (int i = top; i > 0; i--) { 927for (int i = top; i > 0; i--) { 1021stack[top].mixed = true; 1042if (stateTableDocument == this.stateTable && top == 1) { 1079stack[top].mixed = true; 1094while (top > 0) { 1101if (top <= 0) { 1112if (this.namespaces && stack[top].prefix != null) { 1113textWriter.Write(stack[top].prefix); 1116textWriter.Write(stack[top].name); 1121int prevNsTop = stack[top].prevNsTop; 1136for (int i = nsTop; i > stack[top].prevNsTop; i--) { 1148if ((stack[top].defaultNs != stack[top - 1].defaultNs) && 1149(stack[top].defaultNsState == NamespaceState.DeclaredButNotWrittenOut)) { 1153xmlEncoder.Write(stack[top].defaultNs); 1155stack[top].defaultNsState = NamespaceState.DeclaredAndWrittenOut; 1175if (top == 0) { 1178else if (!stack[top].mixed) { 1180int i = beforeEndElement ? top - 1 : top; 1195switch (stack[top].defaultNsState) { 1204stack[top].defaultNs = ns; 1210stack[top].defaultNsState = (declared ? NamespaceState.DeclaredAndWrittenOut : NamespaceState.DeclaredButNotWrittenOut); 1227if (existingNsIndex != -1 && existingNsIndex > stack[top].prevNsTop) { 1281int temp = stack[top].prefixCount++ + 1; 1282return "d" + top.ToString("d", CultureInfo.InvariantCulture) 1318if ( nsIndex > stack[top].prevNsTop ) { 1324for ( int i = nsTop; i > stack[top].prevNsTop; i-- ) { 1409stack[top].xmlLang = value; 1415stack[top].xmlSpace = XmlSpace.Default; 1418stack[top].xmlSpace = XmlSpace.Preserve; 1448if (top == stack.Length - 1) { 1450if (top > 0) Array.Copy(stack,na,top + 1); 1455stack[top].Init(nsTop);