Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. xflat usage

xflat usage

Scheduled Pinned Locked Moved XML / XSL
xmldatabasesysadminquestionannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jeffkish
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups