Help with documentToRecord and xCBL order

I am having problems in converting an xcbl xml order to a record. My environment is : IS4.6 fix1, wmxCBL package.

I am getting an xcbl3.5 xml order string as input and I am trying to convert it into a record. Xml string starts with ………

I convert this into record by using stringToDocument (isXML:True) & documentToRecord ( make Arrays:False, recordName: path to xcbl order). The webMethods WmxCBL packages, Order structure is like this:
Order
—OrderHeader
—OrderDetail
—OrderSummary.

After the conversion the resulting boundnode is mapped to a structure referencing the above Order Structure. The result structure is like this

Order100(Order)
—@version=1.0
—@encoding=utf-8
—OrderHeader
—OrderDetail
—OrderSummary

Question 1: Since my reference structure does not have these @version and @encode, how do I get rid of them? or when I am converting to record, how can I exclude the first two lines or make them ignored?

Question 2: Am I missing any more flags in the stringToDocument & documentToRecord? Or do I need to use a special conversion technique to do this?

Question 3: Because of @version is not set to 1.0, When I am mapping values into OrderHeader, instead of mapping them to existing OrderHeader, It creates a new OrderHeader with in the Order100 and maps values into that. Now I have two OrderHeaders in my map. How do I get around this problem?

Basically I understand that my Order100 structure is not same during the mapping and runtime, because of this I am getting the map problem, I think. Please correct me if I am wrong.

I hope some one with xCBL background can shed some light on this.
Thanks in advance,

Steve

Steve,

This is my one my common gripes about converting to records. To recap, you obtain a string containing an xCBL order. String to Document, Document to Record.

After the Document To Record flow, create a map. under the boundNode record in the map flow, create a record reference to the xCBL order, then make the record reference a child of the boundNode record. Should look like this:

boundNode Record
—> OrderRecord

Create a new instance of xCBL Order record and then map the Child Order Record under the boundNode record to this new one. It will get rid of the version and encoding attributes.

Hope this helps.

Ray