J
JR
I am reading in data from a database and based on the value in one
particular cell, will output the data in a certain format. Looking for
some assistance on this. What I'm conceptualizing, is an XML config
file with common values across all "types" and then some that are
specific to each type. So something in XML like:
<user type="common">
<name></name>
<address></address>
<phone></phone>
</user>
<user type="female">
<hair_color></hair_color>
<hair_length></hair_length>
<hair_style></hair_style>
</female>
<user type="male">
<shave></shave>
If the value read in from the database was female for type, it would
write out to a text file called female on the hard drive of the server
and in it would be:
female.txt:
name=Sally Jones
address=100 jones streeet
phone=132-123-1233
hair_color=brown
hair_length=short
hair_style=bobby cut
Can someone point me in the right direction or provide some examples on
how to read in a config file and output values based on the format
defined in the XML file? Order of output is important that it follows
the XML layout as well.
Thanks.
JR
particular cell, will output the data in a certain format. Looking for
some assistance on this. What I'm conceptualizing, is an XML config
file with common values across all "types" and then some that are
specific to each type. So something in XML like:
<user type="common">
<name></name>
<address></address>
<phone></phone>
</user>
<user type="female">
<hair_color></hair_color>
<hair_length></hair_length>
<hair_style></hair_style>
</female>
<user type="male">
<shave></shave>
If the value read in from the database was female for type, it would
write out to a text file called female on the hard drive of the server
and in it would be:
female.txt:
name=Sally Jones
address=100 jones streeet
phone=132-123-1233
hair_color=brown
hair_length=short
hair_style=bobby cut
Can someone point me in the right direction or provide some examples on
how to read in a config file and output values based on the format
defined in the XML file? Order of output is important that it follows
the XML layout as well.
Thanks.
JR