XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Posttop
Stanley BowlingSubject: Flat File Custom XML conversion help
Author: Stanley Bowling
Date: 28 Sep 2010 10:06 AM
Hello,

We have a flat file coming from our source system which represents child nodes as new lines in the same file. The child nodes can be identified by the first two characters of the line.
I need help to get the child nodes attached to the parent xml node. Can you help me figure out how this can be done. I have attached an example and the progress so far.

As in the example attached, the contact is displayed outside the customer,
<Customer>
<Type>A</Type>
<Number>1000</Number>
<FirstName>Casey</FirstName>
<LastName>Adams</LastName>
</Customer>
<Contact>
<ContactType>#C</ContactType>
<Number>585-433-1233</Number>
</Contact>
<Customer>...
I require the contact region to display as a child of customer like this.
<Customer>
<Type>A</Type>
<Number>1000</Number>
<FirstName>Casey</FirstName>
<LastName>Adams</LastName>
<Contact>
<ContactType>#C</ContactType>
<Number>585-433-1233</Number>
</Contact>
</Customer>
<Customer>...


Documentdemo.txt
Demo Flat File

DocumentDemo.xml
Output xml file

UnknownDemo.conv
Demo conv xml info

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.