The problem is your XPath query, it should be in this format:

/keywords/keyword/danish[. ="jeg"]

[ . = "text"] means "find node where the text of the node(.) equals
text.

Bernt Brenna

> -----Original Message-----
> From: John Mandia [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 16, 2002 11:38
> Subject: XML Problem: The expression passed to this method
> should result in a NodeSet.
>
>
> Hi All,
>
> Trying to build a language user control where you can enter a
> danish entry, followed by an english translation, a story id
> (People enter 0 when there is no story) and comments (This is
> the plural version of this word etc). They then select
> whether this entry is a keyword, phrase, question or part of a story.
>
> It calls a class DanishDB to perform the insert and sends the
> information as parameters. I've tried extending this class by
> adding a Method to check to see if it already exists (Only
> implemented for Keyword entry so far).  I thought it would
> work but it doesn't.
>
> first I tried the query "keyword[danish='"+danishEntry+"']"
> but that returned everything within the xml document and it
> just saw the entry as a new entry?????
>
> I've now tried this "danish='" + danishEntry + "'"; and it
> gives me the error mentioned in the subject.
>
> The class looks like the following:
>
> <!--- CUT --->
>
> Any comments would be appreciated.
>
> Thanks,
>
> John
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to