NodeProxy parent = new NodeProxy(p.getDocument(), pid, Node.ELEMENT_NODE);
if (parent == null || pid != parent.gid) parent = new NodeProxy(p.getDocument(), pid, Node.ELEMENT_NODE);
	public NodeSet getParents(boolean rememberContext) {		NodeSet parents = new ExtArrayNodeSet();		NodeProxy p;		long pid;		for (Iterator i = iterator(); i.hasNext();) {			p = (NodeProxy) i.next();			// calculate parent's gid			pid = XMLUtil.getParentId(p.getDocument(), p.gid);			if (pid > -1) {				NodeProxy parent = new NodeProxy(p.getDocument(), pid, Node.ELEMENT_NODE);				if (rememberContext)					parent.addContextNode(p);				else					parent.copyContext(p);				parents.add(parent);			}		}		return parents;	}