Generating an element called <xml> is a really bad idea, because names beginning with "xml" are reserved for use in future standards. Shows how carefully some vendors read the specs.
The name of the z:row elements is z:row, not z, so to select them, you need a path expression such as /xml/rs:data/z:row. If I remember rightly, the Microsoft XPath API takes the namespace context for an XPath expression from the node used as the target of the selectNodes() call, which is OK in cases like this where the namespaces are all declared on the outermost element.
Then you want to add a predicate such as
/xml/rs:data/z:row[@PGDT_DCLS_SYS_NO='26'][
not(@PGT_DTYP_SYS_NO = preceding-sibling::z:row[@PGDT_DCLS_SYS_NO='26']/@PGT_DTYP_SYS_NO)]
A bit clumsy - it would be much easier in XPath 2.0.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference