Click here to Skip to main content
15,905,686 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: @ Symbol within XML Schema Pin
led mike5-Jan-09 4:57
led mike5-Jan-09 4:57 
GeneralRe: @ Symbol within XML Schema Pin
tomkettering5-Jan-09 22:31
tomkettering5-Jan-09 22:31 
Questionschema for xml document Pin
tejesh1232-Jan-09 22:26
tejesh1232-Jan-09 22:26 
AnswerRe: schema for xml document Pin
Brij4-Jan-09 1:13
mentorBrij4-Jan-09 1:13 
QuestionCData Problem Pin
SreejithKumar M1-Jan-09 22:57
SreejithKumar M1-Jan-09 22:57 
Questionwhat is the benefit of DTD ? DTS VS Schema? Pin
Honeyboy_201-Jan-09 13:52
Honeyboy_201-Jan-09 13:52 
AnswerRe: what is the benefit of DTD ? DTS VS Schema? Pin
Brij2-Jan-09 0:28
mentorBrij2-Jan-09 0:28 
Questionxflat usage Pin
jeffkish31-Dec-08 9:43
jeffkish31-Dec-08 9:43 
Hi.

I know there must be many ways to skin this cat, but I've invested a little time in xflat and I was wondering if someone has the experience to point out what I'm doing wrong?

if someone else knows a better/simpler way to convert the data from flat file to xml I'd appreciate a suggestion also.

thanks
Jeff
My flat file data format consists of records that are pipe delimited
and all start with a 2 digit code, here is what 2 files might look like:

file1
05|vendor1code|vendor1desc|vendor1code2
05|vendor2code|vendor2desc|
05|vendor3code|vendor3desc|vendor3code2
05|vendor4code|vendor4desc
05|vendor5code|vendor5desc|vendor5code2
10|AA000222|NULLSERVER|D:|\otherdir\information\AA000222\
22|part9100|HANDLE|XX00|internalnum3|SMALL HANDLE|0
22|part44|GINORMOUS LEG|AA00|||0


file2
05|vendor1code|vendor1desc|vendor1code2
05|vendor6code|vendor6desc|
05|vendor9code|vendor9desc|vendor9code2
10|XY000034|NULLSERVER|C:|\mydir\information\XY000034\
22|part0100|ROTOR|XX00|internalnum12|big ROTOR|1
22|part100-7|BIG FRAME|XX00|||0


The first part of my 'real' data file is like this:

05|CH07|CHICAGO RAWHIDE|
05|XD00|XOULD|
05|XP00|XOULDS SUMPS|
10|XY000034|NULLSERVER|C<code>:</code>|\mydir\information\XY000034\
22|part0100|ROTOR|XX00|internalnum12|big ROTOR|1
22|part100-7|BIG FRAME|XX00|||0


and my flat xfl file (the schema for xflat input) is like this:

<br />
<?xml version='1.0'?><br />
<XFlat Name="navigator_mld_schema" Description="Schema for mld flat file"><br />
	<SequenceDef Name="manuals" Description="Manual MLD flat file"><br />
		<ChoiceDef Name="import_record" Description="Import Data Of One Record Type" MinOccur="0" MaxOccur="11" MapToXml="No" ><br />
			<RecordDef Name="oem_05" FieldSep="|" RecSep="\N"><br />
				<FieldDef Name="order_code" DataType="Integer" ValidValue="05" MapToXml="No" NullAllowed="No"/><br />
				<FieldDef Name="vendor" MapToXml="No"/><br />
				<FieldDef Name="description" MapToXml="No"/>			<br />
			</RecordDef><br />
			<RecordDef Name="location_10" FieldSep="|" RecSep="\N"><br />
				<FieldDef Name="order_code" DataType="Integer" ValidValue="10" MapToXml="No" NullAllowed="No"/><br />
				<FieldDef Name="manual" MapToXml="No"/><br />
				<FieldDef Name="server" MapToXml="No"/><br />
				<FieldDef Name="drive" MapToXml="No"/><br />
				<FieldDef Name="path" MapToXml="No"/>			<br />
			</RecordDef><br />
			<RecordDef Name="mfgrpart_item_22" FieldSep="|" RecSep="\N"><br />
				<FieldDef Name="order_code" DataType="Integer" ValidValue="22" MapToXml="No" NullAllowed="No"/><br />
				<FieldDef Name="part" NullAllowed="Yes" MapToXml="No"/><br />
				<FieldDef Name="partdescription" NullAllowed="Yes" MapToXml="No"/><br />
				<FieldDef Name="vendor" NullAllowed="Yes" MapToXml="No"/>							<br />
				<FieldDef Name="item" NullAllowed="Yes" MapToXml="No"/><br />
				<FieldDef Name="description" NullAllowed="Yes" MapToXml="No"/><br />
				<FieldDef Name="stocked" MapToXml="No" /><br />
			</RecordDef><br />
		</ChoiceDef><br />
	</SequenceDef><br />
</XFlat><br />


==========================================
When I run xflat I get this:

Licensed copy of XML Convert 2.2.
Copyright (C) 1999 - 2007 Unidex, Inc. All rights reserved.
You may use this software only if you have read the license agreement
and accept its terms.
For more information, please visit http://www.unidex.com/.

Error parsing the flat file.
Description: Unrecognizable record.
The error occurred in file:/C:/Downloads/Utilities/XQuery/XMLConvert/xmlconvert/testdata/gp000034.dxx at record number 1.
The character offset of this record (from the beginning of the file) is 1.
The bad record begins with:
05|CH07|CHICAGO RAWHIDE|
05|XD00|XOULD

I dumped the data file to make sure there were really 13 10 line feeds at the end of each line, so I'm not sure what could be going wrong.

thanks alot
Jeff
QuestionProblem in reading XML schema... Pin
nileshbahirshet26-Dec-08 20:05
nileshbahirshet26-Dec-08 20:05 
AnswerRe: Problem in reading XML schema... Pin
Brij27-Dec-08 0:06
mentorBrij27-Dec-08 0:06 
GeneralRe: Problem in reading XML schema... Pin
nileshbahirshet27-Dec-08 1:26
nileshbahirshet27-Dec-08 1:26 
QuestionProblem in reading XML schema... Pin
nileshbahirshet26-Dec-08 20:04
nileshbahirshet26-Dec-08 20:04 
AnswerRe:Repost Pin
Brij26-Dec-08 23:48
mentorBrij26-Dec-08 23:48 
QuestionHow to read only Nodes in schema ? Pin
nileshbahirshet26-Dec-08 1:05
nileshbahirshet26-Dec-08 1:05 
AnswerRe: How to read only Nodes in schema ? Pin
Not Active26-Dec-08 3:20
mentorNot Active26-Dec-08 3:20 
QuestionC# .NET web services: Manipulating XML Pin
tiwari_neha23-Dec-08 18:06
tiwari_neha23-Dec-08 18:06 
AnswerRe: C# .NET web services: Manipulating XML Pin
Brij23-Dec-08 20:37
mentorBrij23-Dec-08 20:37 
GeneralRe: C# .NET web services: Manipulating XML Pin
tiwari_neha23-Dec-08 22:34
tiwari_neha23-Dec-08 22:34 
GeneralRe: C# .NET web services: Manipulating XML Pin
Brij23-Dec-08 23:07
mentorBrij23-Dec-08 23:07 
AnswerRe: C# .NET web services: Manipulating XML Pin
Not Active24-Dec-08 3:43
mentorNot Active24-Dec-08 3:43 
QuestionProblem with Installing Service from MSM in WIX Pin
swamy Narasimha23-Dec-08 4:36
swamy Narasimha23-Dec-08 4:36 
QuestionDynamically Creating Tables based on XSD or XML Pin
Dan Madden18-Dec-08 6:34
Dan Madden18-Dec-08 6:34 
AnswerRe: Dynamically Creating Tables based on XSD or XML Pin
led mike18-Dec-08 9:23
led mike18-Dec-08 9:23 
QuestionHTML Transparent Background Pin
Punitha_V17-Dec-08 14:16
Punitha_V17-Dec-08 14:16 
AnswerRe: HTML Transparent Background Pin
Brij18-Dec-08 1:10
mentorBrij18-Dec-08 1:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.