XML Convert 1.1 - Attributes and Element

James Robertson jamesr at steptwo.com.au
Wed Nov 3 03:41:32 GMT 1999

At 11:36 3/11/1999 , RANGANATHAN Sridhar wrote:

>Hello Everyone,
>I have a question with XML Convert in creating a XML document from flat
>The input flat file record structure is:
>F1 F2  F3
>I want to create an XML document with the following structure:
><employee attribute1= "F1" attribute2="F2">F3</employee>
>With my limited knowledge of XML Convert I am able to convert to the
><employee attribute1= "F1" attribute2="F2">
>   <newfld>F3</newfld>
>If anyone has accomplished this with XML Convert please share with me.

I don't know anything about XML Convert, but
here's the Omnimark commands you need to achieve this:

         [ANY EXCEPT WHITE-SPACE]+ => F2
         ANY-TEXT+ => F3 "%n"

         OUTPUT "<employee attribute1='" || F1
                 || "' attribute2='" || F2
                 || "'>" || F3
                 || "</employee>"

(Note: this has not been tested!)

A Perl script would also get the job done.

Hope this helps,


James Robertson
Step Two Designs Pty Ltd
SGML, XML & HTML Consultancy
jamesr at steptwo.com.au

"Beyond the Idea"
  ACN 081 019 623

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)

More information about the Xml-dev mailing list