The W3C basically salted the earth for graph languages by promoting their awful XML syntax for RDF for so long -- it doesn't just encourage you to just write things as kookily-flavored standard XML trees -- it's also incapable of expressing true non-tree graphs!
N3 is a much better syntax, but even it doesn't quite get quite to the level of homoiconicty you desire: http://www.w3.org/DesignIssues/Notation3