S
sethridge1991
Hi Everyone,
I am trying to send a XML file via SFTP staying completely in UNIX.
The data in the file will vary everytime I create and send it. This is
not a simple address book dump.
This is what I am trying to do:
1. Access my Unix DataBase
2. Depending on the situation, different data, some of it repeating,
gets dumped into a UNIX text file. Because of the potential
combinations of required data, I am embedding the corresponding data
tags around the individual data items when I am deciding which data
should be sent. The data comes from several related DB Files.
My first line in my text file is -<header>.
3. I want to execute a UNIX script that will convert the text file,
login to a SFTP server in batch mode and send the converted file to
the SFTP server.
The SFTP part is ok. It is the conversion to XML that is the problem.
All the examples I see on the Net, involve typical data.
Here is a simple stripped down example of what my text file would look
like (bare in mind, this does not reflect the complexity of the
decision making or data):
-<header>
-<personal_info>
-<name>John Smith</name>
-<address1>123 Main Street</address1>
-<address2>Any City, XX 9999999</address2>
-<status>employed</status>
-<occupation>plumber</occupation>
-<salary>60000</salary>
</personal_info>
-<personal_info>
-<name>Jane Doe</name>
-<address1>100 Maple Street</address1>
-<address2>First City, YY 8888888</address2>
-<status>housewife</status>
</personal_info>
</header>
In this example, people who are employed also require occupation and
salary. The data is not typical. Trying to dump the data comma
separated, in this example, may look easy, but my actual situation
does not lend itself to null fields.
Is there a point where I can start in the conversion and take
advantage of the fact the embedded data tags already exist?
The <?xml> line will be version 1.0, encoding UTF-8, standalone Yes.
I have the full XML Library in my UNIX version (SCO Openserver 5.7).
Any ideas or suggestions would be greatly appreciated.
Regards,
Steve
I am trying to send a XML file via SFTP staying completely in UNIX.
The data in the file will vary everytime I create and send it. This is
not a simple address book dump.
This is what I am trying to do:
1. Access my Unix DataBase
2. Depending on the situation, different data, some of it repeating,
gets dumped into a UNIX text file. Because of the potential
combinations of required data, I am embedding the corresponding data
tags around the individual data items when I am deciding which data
should be sent. The data comes from several related DB Files.
My first line in my text file is -<header>.
3. I want to execute a UNIX script that will convert the text file,
login to a SFTP server in batch mode and send the converted file to
the SFTP server.
The SFTP part is ok. It is the conversion to XML that is the problem.
All the examples I see on the Net, involve typical data.
Here is a simple stripped down example of what my text file would look
like (bare in mind, this does not reflect the complexity of the
decision making or data):
-<header>
-<personal_info>
-<name>John Smith</name>
-<address1>123 Main Street</address1>
-<address2>Any City, XX 9999999</address2>
-<status>employed</status>
-<occupation>plumber</occupation>
-<salary>60000</salary>
</personal_info>
-<personal_info>
-<name>Jane Doe</name>
-<address1>100 Maple Street</address1>
-<address2>First City, YY 8888888</address2>
-<status>housewife</status>
</personal_info>
</header>
In this example, people who are employed also require occupation and
salary. The data is not typical. Trying to dump the data comma
separated, in this example, may look easy, but my actual situation
does not lend itself to null fields.
Is there a point where I can start in the conversion and take
advantage of the fact the embedded data tags already exist?
The <?xml> line will be version 1.0, encoding UTF-8, standalone Yes.
I have the full XML Library in my UNIX version (SCO Openserver 5.7).
Any ideas or suggestions would be greatly appreciated.
Regards,
Steve