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