views:

13

answers:

0

i have got 2 XML files to join and having a lot of trouble joining them.

Im trying to use LINQ to XML to do it, but i havent quite figured out how i can make them join, or if its possible.

here is what they look like:

<?xml version="1.0" encoding="utf-8"?>
<routes>
  <route>
    <id>9</id>
    <street>3</street>
    <street>12</street>
    <street>29</street>
  </route>
  <route>
    <id>7</id>
    <street>1</street>
    <street>12345</street>
  </route>
</routes>



<?xml version="1.0" encoding="utf-8"?>
<maps>
  <map>
    <id>6</id>
    <street>3</street>
    <street>9</street>
    <street>8</street>
    <street>11111</street>
    <street>12</street>
  </map>
  <map>
    <id>4</id>
    <street>3</street>
    <street>6</street>
    <street>7</street>
    <street>12345</street>
  </map>
  <map>
    <id>9</id>
    <street>1</street>
    <street>2</street>
    <street>3</street>
  </map>
</maps>
</code>

so what i need to try and retrieve is for each route id in the first xml file get the map ids in which the streets match on both sides... eg:

 9 4 6 9
 8 6
 7 4 9
 3 6