Posted: Tue Feb 22, 2011 10:22 pm Post subject: Help required in parsing a file
Acolyte
Joined: 09 Feb 2011 Posts: 68
Hi,
My file structure is like this
DT 30653 PROP DOUBLETREE HOTEL NEW ORLEANS-KENNER 2150 Veterans Memorial Bouleva Kenner NEW ORLEANS LA LA 70062 70062 US 1-504-467-3111 1-504-461-0572 MSY MSY DTREE NW ORL-KENNER 30653 002M 012M X X X X 0000 0000 1500 X XX XX X X X X X X XXXX X X X X X X XX X 00243
DT 30653 ADDR 2150 Veterans Memorial Boulevard@ Kenner@LA@70062@ US@
DT 30653 DESC - The Doubletree Hotel New Orleans Airport conveniently located in suburban New Orleans just off I-10 offers full service hotel accommodations only two miles from Louis Armstrong New Orleans International Airport /MSY/ and minutes from the French Quarter and downtown New Orleans. We provide complimentary 24-hour airport
DT 30653 DESC shuttle service for hotel guests. Our tastefully-appointed and spacious guest rooms suites and executive accommodations offer a long list of amenities and conveniences like pampering bath amenities generous work surfaces luxurious Sweet Dreams bedding and complimentary high-speed internet access.
DT 30653 DESC For your convenience wireless HSIA is available in public areas throughout the hotel. Our guests also have full use of hotel amenities including * A sparkling outdoor pool * A 24-hour Fitness Center * Plentiful free on-site parking
DT 30653 DESC * Concierge services * Extended in room dining hours After business or before a night in the Big Easy relax with friends or associates at our inviting Lobby Lounge On the Rocks. Dine in with us at our casual Creole/American bistro-style restaurant River City
DT 30653 DESC Creole Grille serving freshly prepared standards and regional favorites for breakfast lunch and dinner daily. And don*t forget to start the day right with our extensive Doubletree Breakfast buffet. Our airport hotel has 12 000 SF of flexible meeting spaces and banquet facilities to accommodate up to 450
DT 30653 DESC for your next important New Orleans area meeting convention or group event. Our Kenner location is convenient to Port Fourchon and close to Louisiana corporate offices like Union Carbide DOW Chemical Dupont Cytec Marathon Oil Shell Monsanto BP Noble Corp. and Astra Zeneca. State-of-the-art audio/visual and
DT 30653 DESC connectivity solutions a 24-hour Business Center creative catering services and a professional meeting and banquet staff will support and flawlessly execute your next successful business conference training seminar reception or gala social event. We*re also convenient to New Orleans attractions like
DT 30653 DESC the French Quarter Bourbon Street the Superdome Historic Rivertown National World War II Museum and more. Whether business vacation or romantic getaway brings you to the New Orleans area our courteous and caring hotel staff looks forward to welcoming you to Louisiana with our signature warm Doubletree Chocolate
DT 30653 DESC Chip Cookie at check-in. .
DT 43217 PROP GAIA NAPA VALLEY HOTEL 3600 Broadway American Canyon SAN FRANCISCO CA CA 94503 94503 US 1-707-6742100 1-707-6742555 SFO APC GAIA NAPA VALLEY HO 43217 004M 031M X X X XX 2006 0000 1500 X XX XX X X XXXXX X X XXX XX X XX XX X XX X X XXX 00131
DT 43217 ADDR 3600 Broadway@ American Canyon@CA@US@94503@ US@
DT 43217 DESC Gaia Greek for Mother Earth Environmentally sustainable- socially responsible- and economically successful. Come experience the beauty of Gaia Napa Valley Hotel and Spa- A fusion of East and West- Energy and Light. Heighten you awareness at our green touch screen kiosk- stay
DT 43217 DESC on track in our business center- and enjoy the tranquil setting of our waterfall lagoon. Observe the beauty- eloquence- and grace of our swans. Following an invigorating workout in the fitness room take a dip in our heated pool or simply relax in the hot tub. Rejuvenate Mind- Body- and Soul at Spa Gaia- Where your
DT 43217 DESC senses will be tickled- tantalized- and taken away. The gateway to the Napa Valley wine country- one of the most highly desirable destinations in California.
So the file will be like this
1. We will have a PROP structure which will give details on PROPERTY
2. We will have ADDR structure which will give details on ADDRESS
3. We will have repeating DECS structures which will give details on descriptions
Each structure is delimited by <CR><LF>
Each structure is a fixed length
I created a TDS parser with 3 complex types for each of them and a complex type with all thses added to it and create a ,essge with this complex type.
Main issue: When will the parser know that now DESC has ended and it needs to create a PROP stucture.
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
Are not DESC & PROP identifying tags?
As a general rule it would be better to obfuscate any possible customer data before posting it here.
Do I really want to know that I get a Double Choc chip cookie at checkin?
But in some places posting actual data is a criminal offence. (probably not here)
but I hope you understand what I'm talking about. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum