Can something be a parent or child "to"/"of" something?

I am writing some software documentation. There are data structures that are organized in trees and every element in the structure can be child or parent "to"/"of" every other element.

I am not a native speaker and my instincts are pretty divided on the matter themselves, so I guess I have to turn to higher powers to answer that question. Hence, I turn to you:
Is it "to" or "of" in that case?


Solution 1:

"Of" is the preposition you are looking for. You can also use the possessive 's:

  • X is a parent of Y
  • Y is a child of X
  • X is Y's parent
  • Y is X's child

Solution 2:

Poets differ on this too :)

Wordsworth said of:

My heart leaps up when I behold
A Rainbow in the sky:

So was it when my life began;
So is it now I am a man;
So be it when I shall grow old,
Or let me die!

The Child is father of the man;
And I could wish my days to be

Gerard Manley Hopkins said to:

‘THE CHILD is father to the man.’
How can he be? The words are wild.
Suck any sense from that who can:
‘The child is father to the man.’
No; what the poet did write ran,
‘The man is father to the child.’
‘The child is father to the man!’
How can he be? The words are wild.