Note that there are some explanatory texts on larger screens.

plurals
  1. POnodes.Current.SetValue("...") fluke?
    text
    copied!<pre><code>XPathNodeIterator nodes = nav.Select("//d:page/d:field/d:value", nsmgr); ...do stuff.. nodes.MoveNext(); nodes.Current.SetValue(i.ToString()); //&lt;-HERE! nodes.MoveNext(); nodes.Current.SetValue(numPages.ToString()); ..do more stuff... </code></pre> <p>I use the <code>nodes.Current.SetValue()</code> function MANY times through this program, and it's only in this one instance (each time for this node) that it just doesn't want to work. With breakpoints, it will show the that node's innerXML reflects <code>i</code> as it's supposed to. Afterwards, printing it doesn't work. I reselected that node in particular before saving the nav stream and still nothing. (Actually, it isn't <em>nothing</em>. It seems to be spaces or possibly even a line feed. I have no idea why in this case it just doesn't work. Below is the pertinant XML for these two nodes.</p> <pre><code>&lt;field sid="PAGE"&gt; &lt;itemlocation&gt; &lt;ae&gt; &lt;ae&gt;absolute&lt;/ae&gt; &lt;ae&gt;1051&lt;/ae&gt; &lt;ae&gt;899&lt;/ae&gt; &lt;/ae&gt; &lt;ae&gt; &lt;ae&gt;extent&lt;/ae&gt; &lt;ae&gt;47&lt;/ae&gt; &lt;ae&gt;24&lt;/ae&gt; &lt;/ae&gt; &lt;/itemlocation&gt; &lt;value&gt; &lt;/value&gt; &lt;borderwidth&gt;0&lt;/borderwidth&gt; &lt;fontinfo&gt; &lt;ae&gt;Times New Roman&lt;/ae&gt; &lt;ae&gt;10&lt;/ae&gt; &lt;ae&gt;plain&lt;/ae&gt; &lt;/fontinfo&gt; &lt;justify&gt;center&lt;/justify&gt; &lt;scrollhoriz&gt;wordwrap&lt;/scrollhoriz&gt; &lt;scrollvert&gt;fixed&lt;/scrollvert&gt; &lt;format&gt; &lt;ae&gt;string&lt;/ae&gt; &lt;ae&gt;optional&lt;/ae&gt; &lt;/format&gt; &lt;next&gt;OFPG&lt;/next&gt; &lt;previous&gt;QTYFA_15&lt;/previous&gt; &lt;acclabel&gt;asterisk. when used as a. hand receipt, enter hand receipt annex number. hand receipt for quarters furniture, enter condition codes. hand receipt annex or components receipt, enter accounting requirements code, ay r c. enter page number.&lt;/acclabel&gt; &lt;/field&gt; &lt;field sid="OFPG"&gt; &lt;itemlocation&gt; &lt;ae&gt; &lt;ae&gt;absolute&lt;/ae&gt; &lt;ae&gt;1129&lt;/ae&gt; &lt;ae&gt;899&lt;/ae&gt; &lt;/ae&gt; &lt;ae&gt; &lt;ae&gt;extent&lt;/ae&gt; &lt;ae&gt;35&lt;/ae&gt; &lt;ae&gt;24&lt;/ae&gt; &lt;/ae&gt; &lt;/itemlocation&gt; &lt;value&gt;4&lt;/value&gt; &lt;borderwidth&gt;0&lt;/borderwidth&gt; &lt;fontinfo&gt; &lt;ae&gt;Times New Roman&lt;/ae&gt; &lt;ae&gt;10&lt;/ae&gt; &lt;ae&gt;plain&lt;/ae&gt; &lt;/fontinfo&gt; &lt;justify&gt;center&lt;/justify&gt; &lt;scrollhoriz&gt;wordwrap&lt;/scrollhoriz&gt; &lt;scrollvert&gt;fixed&lt;/scrollvert&gt; &lt;format&gt; &lt;ae&gt;string&lt;/ae&gt; &lt;ae&gt;optional&lt;/ae&gt; &lt;/format&gt; &lt;previous&gt;PAGE&lt;/previous&gt; &lt;next&gt;NEXT_BUTTON&lt;/next&gt; &lt;acclabel&gt;enter total number of pages.&lt;/acclabel&gt; &lt;/field&gt; </code></pre> <p>I am so confused why this isn't working... Anybody have any ideas?</p> <p>EDIT: More information: I changed the XMLDocument to preserve whitespace. This seems to fix it outputting spaces and/or a linefeed, but the value is still lost.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload