SnowFall 0 Newbie Poster

Hi!
Im looking for the best way to describe a flow chart with xml where blocks have multiple inputs and output. Blocks are placed in "folders" here in my xml I called them blockgroup.
Each block has a name that must be unique within a blockgroup. Inputs and outputs must be unique within the same blocks input/ouputs.

How do I describe a connections like this one:
From: "block D" output "F" in blockgroup "First group"
To: "block A" input "B" in blockgroup "Second group"

or

From: "block A" output "Not unique" in blockgroup "First group"
To: "block D" input "E" in blockgroup "First group"

I have a connection tag at the bottom with two attributes "from" and "to". But now I need your help to get the right values into them.
My xml knowledge is as you see pretty basic, read a little about xpath...am I on the right track?

Here is my XML for this scenario:

<blockgroups>

<blockgroup name="First group">
    <blocks>
        <block name="A">
            <inputs>
                <input name="B">
            <input name="Not unique">
            </inputs>
            <outputs>
                <output name="C">
                <output name="Not unique">
            </outputs>
        </block
        <block name="D">
            <inputs>
                <input name="E">
                <input name="Not unique">
            </inputs>
            <outputs>
                <output name="F">
                <output name="Not unique">
            </outputs>
        </block
    </blocks> 
</blockgroup>

<blockgroup name="Second group">
    <blocks>
        <block name="A">
            <inputs>
                <input name="B">
            <input name="Not unique">
            </inputs>
            <outputs>
                <output name="C">
                <output name="Not unique">
            </outputs>
        </block
        <block name="D">
            <inputs>
                <input name="E">
                <input name="Not unique">
            </inputs>
            <outputs>
                <output name="F">
                <output name="Not unique">
            </outputs>
        </block
    </blocks> 
</blockgroup>

</blockgroups>

<connections>
    <connection from="???" to="???" />
</connections>