[Servingxml-help] urgent help
Brought to you by:
danielaparker
|
From: Yagni, R. <Rav...@co...> - 2006-10-30 23:02:26
|
Hello All:
I am trying to write XML to flat file and here is my <
inverseRecordMapping>
=20
<sx:inverseRecordMapping id=3D"OCSAPXMLToFileMapping">
<sx:onSubtree path=3D"/LoadPayable">
<sx:parameter name=3D"type"
select=3D"ApplicationArea/Sender/ReferenceID/@type"/>
<sx:subtreeRecordMap
recordType=3D"TRecord">
<sx:subtreeFieldMap
select=3D"'T'" field=3D"tag"/>
<sx:subtreeFieldMap
select=3D"$type" field=3D"filetype"/>
<sx:subtreeFieldMap
select=3D"ApplicationArea/CreationDateTime" field=3D"datetime"/>
<sx:subtreeFieldMap
select=3D"ApplicationArea/Sender/ReferenceID" field=3D"batchid"/>
<sx:subtreeFieldMap
select=3D"DataArea/@transactioncount" field=3D"transcount"/>
<sx:subtreeFieldMap
select=3D"DataArea/@totalUnits" field=3D"totalunits"/>
<sx:subtreeFieldMap
select=3D"DataArea/@totalDebit" field=3D"totaldebamt"/>
<sx:subtreeFieldMap
select=3D"DataArea/@totalCredit" field=3D"totalcrdamt"/>
</sx:subtreeRecordMap>
<sx:subtreeRecordMap
match=3D"DataArea/Payable" recordType=3D"HRecord">
=20
<sx:subtreeFieldMap select=3D"'H'" field=3D"tag"/>
=20
<sx:subtreeFieldMap select=3D"$type" field=3D"filetype"/>
=20
<sx:subtreeFieldMap select=3D"PayableHeader/CostCenterID"
field=3D"costcenter"/>
=20
<sx:subtreeFieldMap select=3D"PayableHeader/AccountingDate/BusinessWeek"
field=3D"week"/>
</sx:subtreeRecordMap>
<sx:subtreeRecordMap
match=3D"DataArea/Payable" recordType=3D"DRecord">
=20
<sx:subtreeFieldMap select=3D"'D'" field=3D"tag"/>
=20
<sx:subtreeFieldMap select=3D"PayableLine/ReferenceDocumentID"
field=3D"docid"/>
=20
<sx:subtreeFieldMap select=3D"PayableLine/GLAccount/GLNominalAccount"
field=3D"glaccount"/>
</sx:subtreeRecordMap>
</sx:onSubtree>
</sx:inverseRecordMapping>
=20
It is writing to flat file but my "TRecord" (shown highlighted BOLD in
XML above) has always been written to the end!! I want this to be first
line because this is a header record. I followed all the examples and
spent lot of time on this but I see everywhere that values in the header
record are CONSTANTS but in my case I have to get it from XML. I hope I
am giving as much information as I can, and any help would be greatly
appreciated.
=20
Here is my sample flat file:
H OPERATION WE
DINVOICE NUMBER GLAccount=20
H OPERATION WE
DINVOICE NUMBER G/L ACCOUN
TA/P2006-08-22T09:13:47.358-04:00 IUPUIAPMMDDNN 2
2 100.00 100.00 (I want this record to be first lline because
this is header information)
=20
=20
Thanks.
--Ravi
DISCLAIMER Important! This message is intended for the above named person(s=
) only and is CONFIDENTIAL AND PROPRIETARY. If you are not the intended rec=
ipient of this e-mail and have received it in error, please immediately not=
ify the sender by return email and then delete it from your mailbox. This m=
essage may be protected by the attorney-client privilege and/or work produc=
t doctrine. Accessing, copying, disseminating or re-using any of the infor=
mation contained in this e-mail by anyone other than the intended recipient=
is strictly prohibited. Finally, you should check this email and any attac=
hments for the presence of viruses, as the sender accepts no liability for =
any damage caused by any virus transmitted by this email. Thank you.=0D
|