Link to home
Start Free TrialLog in
Avatar of sublimnl_
sublimnl_

asked on

XML Schema Question

Hi, I am writing my first XML schema and (of course) I have run into a problem.  I have data in Excel similar to what is depicted in the code snippet below and I want to use this same set of data in several different places (intranet, logon scripts, and other in-house utilities ).  I figured the best way to do this was to create a single XML "master" that all the different interfaces would pull the data from so that everything is always consistent across the board.  

Anyway, what we are dealing with are drive mappings at many sites around the world.  What I would like to do is nest all the drive letters from a single site within that site in the XML data.  I tried creating my own schema and was able to successfully export to an XML file, but it is creating something similar to the following:

<site>
      <site_name>SiteA</site_name>
      <drives>
            <driveletter>F</driveletter>
            <path>\\ServerA\BD</path>
            <description>Business Development</description>
      </drives>
</site>
<site>
      <site_name>SiteA</site_name>
      <drives>
            <driveletter>G</driveletter>
            <path>\\ServerA\ACCT</path>
            <description>Accounting Data</description>
      </drives>
</site>
<site>
      <site_name>SiteA</site_name>
      <drives>
            <driveletter>G</driveletter>
            <path>\\ServerA\GIS</path>
            <description>GIS Data</description>
      </drives>
</site>

What I would like is for all three drives to be under a single site tag as I think that this would make it a little easier to parse in the future.  Is this possible?

Site	Ltr	Path		Desc
SiteA	F	\\svr-a\share1	desc1a
SiteA	G	\\svr-a\share2	desc2a
SiteA	G	\\svr-a\share3	desc3a
SiteB	H	\\svr-b\share1 	desc1b
SiteB	H	\\svr-b\share2 	desc2b
SiteB	I	\\svr-b\share3 	desc3b
SiteC	J	\\svr-c\share1 	desc1c
SiteC	L	\\svr-c\share2 	desc2c
SiteC	M	\\svr-c\share3 	desc3c

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dabas
Dabas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I believe my answer addresses the question.
My comment did not have a response.
The moderator also did not explain why my answer should not be accepted.
The question as stated mentions: "What I would like is for all three drives to be under a single site tag"

My answer has all three drives under a single site tag.

Dabas