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