Field Nesting

Q

Qiwen

I have a problem about field nesting.

// have a bookmark "test"
{SET "test" "14" }

//want to get the 14th item's name
{INCLUDETEXT "config1.xml" \c XML \x //item[{"test"}]/name \* MERGEFORMAT }

The result is null. I think it's a problem of field nesting. Any idea?
I write like this. It works well.
{INCLUDETEXT "config1.xml" \c XML \x //item[14]/name \* MERGEFORMAT }

Any help will be greatly appreciated

Qiwen
 
G

Graham Mayor

Did you insert the field boundaries around Test with CTRL+F9?

Try instead {REF Test} or simply {Test}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Q

Qiwen

I insert the field boundaries around test with CTRL+F9. And I tried {REF
Test} and simply {Test}, but it doesn't work.

Graham Mayor said:
Did you insert the field boundaries around Test with CTRL+F9?

Try instead {REF Test} or simply {Test}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

I have a problem about field nesting.

// have a bookmark "test"
{SET "test" "14" }

//want to get the 14th item's name
{INCLUDETEXT "config1.xml" \c XML \x //item[{"test"}]/name \*
MERGEFORMAT }

The result is null. I think it's a problem of field nesting. Any idea?
I write like this. It works well.
{INCLUDETEXT "config1.xml" \c XML \x //item[14]/name \* MERGEFORMAT }

Any help will be greatly appreciated

Qiwen
 
J

Jean-Guy Marcil

Qiwen said:
I insert the field boundaries around test with CTRL+F9. And I tried {REF
Test} and simply {Test}, but it doesn't work.

And if you try {REF test} or {test} outside of the INCLUDETEXT field, does
it work?
If it does, it means that the string is not resolved appropriately for the
\x switch.

Try
{INCLUDETEXT "config1.xml" \c XML \x {QUOTE //item[{test}]/name} }
 
Q

Qiwen

Thanks a lot,

It works when I try {QUOTE //item[{test}]/name}.


Jean-Guy Marcil said:
Qiwen said:
I insert the field boundaries around test with CTRL+F9. And I tried {REF
Test} and simply {Test}, but it doesn't work.

And if you try {REF test} or {test} outside of the INCLUDETEXT field, does
it work?
If it does, it means that the string is not resolved appropriately for the
\x switch.

Try
{INCLUDETEXT "config1.xml" \c XML \x {QUOTE //item[{test}]/name} }
 

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