[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Tutorial: First Steps with XMLBeans
From:       "John Ash" <jfa.subs1 () ntlworld ! com>
Date:       2008-02-13 12:05:27
Message-ID: 002401c86e38$b9e07ca0$4c00a8c0 () lion
[Download RAW message or body]

A comment and a question on the example method 
POUpdater.addLineItemWithCursor.  I'm sending this to the Dev list because I 
think small changes to the tutorial may be required.

1. As it stands, the method does not work if the new line item should be 
placed after the last existing one (change "a new item" to "z new item" to 
show this).  I understand that fixing it would complicate the example 
needlessly, but maybe we should point out the fact, and suggest fixing it as 
an exercise for the reader, with a hint to look up the toEndToken() method 
of the Cursor object?

2. Why is it necessary (or desirable) to release cursor resources with 
Dispose() on the Cursor created by cursor = lineItem.newCursor(), but not on 
the original one created by XmlCursor cursor = po.newCursor()? - or is this 
just an oversight?

Thanks,

    John Ash 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic