change checkbox value when is an attribute

N

nick brandwood

is there a Best Practice method for changing a checkbox attached to an
attribute?

if my section contains the attribute "completed", a true/false attribute,

should I be using:
C#

IXMLDOMNode nodeSection=
thisXDocument.Dom.SelectNode("/my:myFields/my:section")

thisXDocument.GetNamedNodeProperty(nodeSection,'completed','no value');

or

nodeSelection.attributes.setNamedItem('completed')="1" ?

(I ask because I've not managed to get either of thse methods to work.)

thanks,

nick
 
N

nick brandwood

that line should read:

thisXDocument.GetNamedNodeProperty(nodeSection,'completed','no value')="1";
 
N

nick brandwood

now I see how it works!

I had made a mistake in my xpath and given up on this route.

thanks!

nick
 
N

nick brandwood

in case anyone else is reading this conversation, the correct command was:

thisXDocument.DOM.selectSingleNode("/my:myFields/my:richiesta/@my:completed").text = "1";

my:richiesta is a group with the attribute completed.
note the namespace 'my:' before the attribute name.

thanks Greg!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top