Hi I want to read the text element from document, but the element which I want to read is not fixed. The document contains only single element which is string,is there any way I can access the first element of the document.
document
–Field
where Field can have different name.
How is your document/Field name is dynamically changing?Basically you should atleast know the field name then you can map it accordingly to a temp variable if it exits.May be you can try with queryXMLNode service and do XQL query for the document field index 0 ?
No .
I want to extract text element of the document , whose name is not fixed.
is there any way I can access like %doc/0th element% as I do have only 1 element in my document.
I believe you should know the %doc/fieldname% then map works (not with 0th element or undefined name),have you tried with queryXMLNode if you have node in the pipe?
Hi rmg,
Thanks for immediate reply.
Regarding %doc/fieldname% - here the fieldname is varying whose value comes against var1, so I can’t write the substitution like
%doc/%var1%% . Plz correct me if I am wrong.
I am trying to use the query XMLNode but not able to specify the query. I have mapped the document to nsDecls.After that I am not able to proceed. What will be the XQL query.
I tried with doc[0].text . Can you correct me & add points if I am missing.
You could use a Java service. Retrieve the ‘document’ IData from the pipeline, create an IDataCursor for it, call the method first() on the cursor to move it to the first element, then retrieve the value at that position.