Not sure what the correct forum for pgxml/xml2 questions is. I was wondering what is the definition of "valid" that the xml_valid(text) function that is part of that module uses? It seems different from the W3C definition of "valid" XML (is there an implicit DTD?) Maybe it is more akin to "well-formed"? George