public static ValueSelector valueOf(String s) {
        int fromIndex = s.lastIndexOf("DicomAttribute");
        try {
            return new ValueSelector(AttributeSelector.valueOf(s),
                    AttributeSelector.selectNumber(s, fromIndex) - 1);
        } catch (Exception e) {
            throw new IllegalArgumentException(s);
        }
    }
@Test
    public void testValueOf() {
        ValueSelector vs = ValueSelector.valueOf(XPATH);
        assertEquals(Tag.StudyInstanceUID, vs.tag());
        assertNull(vs.privateCreator());
        assertEquals(0, vs.valueIndex());
        assertEquals(1, vs.level());
        ItemPointer ip = vs.itemPointer(0);
        assertEquals(Tag.RequestAttributesSequence, ip.sequenceTag);
        assertNull(ip.privateCreator);
        assertEquals(0, ip.itemIndex);
    }