Guest User

Untitled

a guest
Feb 19th, 2018
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. ## The problem
  2.  
  3. Generating the XML to draw a family tree in flash using none linear relationships. Most family trees use Mother / Father... but what if the person has two mothers or two fathers... or one mother and two fathers. Thinking more emotional than genetic. Say we start from a single family member and draw out the relationships from there... or load all the users and draw relationships to each one one by one.
  4.  
  5. So, how do we come up with a way to consistantly represent this in a diagram and in XML.
  6.  
  7. What are some of the issues we're going to hit.
  8.  
  9. How do you know where to place the nodes?
  10.  
  11. ## The Relationship Table - Sample Data
  12.  
  13. +----+---------+-------+--------------------+-----------------------+
  14. | id | from_id | to_id | blood_relationship | personal_relationship |
  15. +----+---------+-------+--------------------+-----------------------+
  16. | 1 | 32 | 3 | parent | parent |
  17. | 2 | 36 | 3 | sibling | sibling |
  18. | 3 | 32 | 36 | parent | parent |
  19. | 5 | 39 | 1 | parent | parent |
  20. | 6 | 3 | 1 | spouse | spouse |
  21. | 7 | 3 | 39 | sibling | sibling |
  22. | 12 | 46 | 39 | spouse | spouse |
  23. | 13 | 46 | 1 | spouse | spouse |
  24. | 14 | 1 | 43 | spouse | spouse |
  25. | 15 | 27 | 1 | parent | parent |
  26. | 16 | 50 | 46 | spouse | spouse |
  27. | 17 | 20 | 11 | parent | parent |
  28. | 18 | 54 | 20 | parent | parent |
  29. +----+---------+-------+--------------------+-----------------------+
Add Comment
Please, Sign In to add comment