smackababy
Lifer
I know this isn't exactly programming, but it is of a more technical nature and I figured this was the best place. If not, please move it to the appropriate section (hopefully, not the deleted section =3 )
I am having trouble getting an Excel document formatted properly into an XML. Now, I've done this before, but this is particularly difficult. The trouble I am having (besides Excel being terrible) is that the data is line data from a mainframe. How I got chosen to do this was literally "Hey, you're a developer and know XML! Do this please." It has to be in a very specific format to upload to a program and I've created schemas for the rest of the objects, but this particular one is giving me trouble.
The XML has to be in this format:
The issue is my data is returned as such:
Now, there is some other information, but those are the fields I am having trouble with. Any ideas how to format this Excel to make mapping to XML easier? Or a special way to do the XML schema? The data is around 55 thousand lines, and that isn't a full export. Some reports have hundreds of IDs and some have one or two.
Thanks in advance.
I am having trouble getting an Excel document formatted properly into an XML. Now, I've done this before, but this is particularly difficult. The trouble I am having (besides Excel being terrible) is that the data is line data from a mainframe. How I got chosen to do this was literally "Hey, you're a developer and know XML! Do this please." It has to be in a very specific format to upload to a program and I've created schemas for the rest of the objects, but this particular one is giving me trouble.
The XML has to be in this format:
Code:
<root>
<report name="report1">
<permission user="user1" />
<permission user="user2" />
</report>
<report name="report2">
<permission user="user1" />
<permission user="user3" />
</report>
</root>
The issue is my data is returned as such:
Code:
[Report Name] [User]
report1 user1
report1 user2
report2 user1
report2 user3
Now, there is some other information, but those are the fields I am having trouble with. Any ideas how to format this Excel to make mapping to XML easier? Or a special way to do the XML schema? The data is around 55 thousand lines, and that isn't a full export. Some reports have hundreds of IDs and some have one or two.
Thanks in advance.