xquery problem: how not show tags in response

I don’t find how to get responses to queries and without show tags. This is my query:

declare namespace rp210Elements=“urn:SMPTE:Dictionary”
for $a in input()/DVD/Production/rp210Elements:FrameworkTitle
return $a/text()

This is the response:

<?xml version="1.0" encoding="utf-8"?>

<xq:Result xmlns:xq=“http://namespaces.softwareag.com/tamino/XQuery/result”>
xq:textNodeNijinski Productions version1</xq:textNode>

and I would like to get this:


I will be very grateful if someone could help me.


Hello Diego,
have you tried to append

{?serialization method="xml"?}

to your xquery? In your case:

{?serialization method="xml"?}
declare namespace rp210Elements="urn:SMPTE:Dictionary" 
for $a in input()/DVD/Production/rp210Elements:FrameworkTitle 
return $a/text()

Works fine to get rid of tags returned by Tamino I don’t really need.

You can find this in Tamino Documentation under
XQuery 4 User Guide ->Advanced Usage -> Serializing your Query Results.

But I still have the problem that, in my case, it doesn’t work when using Java API. In this case I just get a Null Pointer Exception. So I don’t add this processing instruction to my queries, take the whole result and use an XSLT Stylesheet to delete the tage I don’t need afterwards. :frowning:

Hope this helps.
Greetings, Andreas

Thanks a lot for your help,
I have the same problem that you when I use it when using Java API. Finally I am using a Recognizer of regular expresions “Librarie (java.util.regex.*)”. With that I delete the tags in Java.
Anyway maybe I will try by creating an XSLT Stylesheet to delete the tag.


Thank you for the hint. We will work on the NPE in the Tamino Java API. In Tamino 4.4 we have introduced some methods to the TXQuery class to parameterize the serialization of an XQuery result. Please use the method TXQuery.setOutputMethod() with the parameter TOutputMethod.XML.

Best Regards,