<HostFileExport> <Batch> <Header> <BatchNumber>445</BatchNumber> <BatchDate>20020524113059</BatchDate> <SeqStartNumber>1</SeqStartNumber> <P1OperatorID>user1</P1OperatorID> <P2OperatorID>user1</P2OperatorID> <DebitTotal>1234.56</DebitTotal> <DebitCount>50</DebitCount> <CreditTotal>1234.56</CreditTotal> <CreditCount>50</CreditCount> </Header> <Item> <Sequence>1</Sequence> <Type>1</Type> <PaidAmount>25.00</PaidAmount> <TransactionType>3</TransactionType> <MemberID>99101010</MemberID> <ScanlineAmount>30.00</ScanlineAmount> <SponsorCode>900</SponsorCode> <FrcsCode>200</FrcsCode> <FrcCode>100</FrcCode> <DocumentControlNumber/> </Item>For right now all I can think of is to hardcode the begin and end tags when creating the ascii file and fput after every line. The indenting I haven't thought of yet.