How get *body content from document reference

Hi All,

I have a document reference extracted from xml schema.

The xml structure is:

I’m interested to get only the value of tag , so I’ve created a documet called ‘c’ that contains a string field ‘c’, but when I explore the node, in the results panel I m able to see the correct value associated to a field called *body, but when I try to get this value using %body% or something like that NULL is returned.

Could somebody help me?

Thanks in advance

My guess is that “c” is an XML Attribute not an XML Element. The content of attributes are mapped to the *body field.

Assuming you are using pub.xml:queryXMLNode, you should be able to use the XQL query /a/@c/text() to get the String value of the attribute.


Did you tried the variable substitution with %a/c/*body% and extract value.

Else please follow as Mark suggested try with queryXMLNode service and select XQL query.


Thanks for your prompt reply,

I also try to use variable substitution as RMG suggest but no value was extracted.
Basically my xml is like following:

code descr and I would like to extract the string 'descr' that is shown into results panel as *body text for the document named 'c'. I don't understood well what Mark suggest :( and up to now I still have my problem.

Have you some other suggestion to reach solution?
Thanks & best regards,

In you xml dtd structure is it showing as *body where *body holds=descr value?

I have seen *body notation in many standard document types like PIP’s,chemXML,cXML,OAG BOD’c…especially for free text,product description structures.

If so the variable substitution should work.Not sure where you might be missing in extracting the value.


In my schema I can see only the tag and not *body. My xml is a PIP format. It is strange that if I use a branch switching on /a/c/*body the check is fine but if I try to use variable substitution for a debug message isn’t working.
I really become hungry for this…

But how can you see *body in the pipeline? If the branch operation works fine definetely it should be there in the schema/dtd structure and you should extract the value from pipeline.

As i said PIP xml’s have the *body notation and mapping from this value should work as is.

Can you debug more a bit and see whats going on whether (casesensitive,improper xpath etc…)


Add <?xml version="1.0"?> as the first line.

<?xml version="1.0"?> code descr

Use xmlStringToXMLNode (isXML=true) and then queryXMLNode. Set WQL query for c=doc.c[0].text.



Seems you strange but in the pipeline I se only the structure document ‘a’ field ‘c’ and no more.


As RMG mentioned, the *body is commonly used by PIPs to allow some FreeFormText… Eg. the following xml:


apprears as following in the IS Doc:
------- *body [value=VSPADARO]

Whether you want to use this value in branch or mapping, all you gotta do is to map the variable (in your case) as follows:

a (document)
— c (document)
------- *body [map this to a ‘temp’ variable]

then you can use this temp variable to branch or do whatever. I believe you can also use a/c/*body, but its more clean this way.

HTH, Rohit