@@ -0,0 +1,2275 @@
+package org.robolectric.res;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport javax.xml.stream.XMLInputFactory;%0Aimport javax.xml.stream.XMLStreamException;%0Aimport javax.xml.stream.XMLStreamReader;%0A%0Aimport java.io.StringReader;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class StaxValueLoaderTest %7B%0A%0A  private PackageResourceTable resourceTable;%0A  private NodeHandler topLevelNodeHandler;%0A  private StaxDocumentLoader staxDocumentLoader;%0A%0A  @Before%0A  public void setUp() throws Exception %7B%0A    resourceTable = new PackageResourceTable(%22pkg%22);%0A%0A    topLevelNodeHandler = new NodeHandler();%0A    staxDocumentLoader = new StaxDocumentLoader(%22pkg%22, null, topLevelNodeHandler);%0A  %7D%0A%0A  @Test%0A  public void ignoresXliffTags() throws Exception %7B%0A    topLevelNodeHandler.addHandler(%22resources%22, new NodeHandler()%0A        .addHandler(%22string%22, new StaxValueLoader(resourceTable, %22string%22, ResType.CHAR_SEQUENCE))%0A    );%0A%0A    parse(%22%3Cresources xmlns:xliff=%5C%22urn:oasis:names:tc:xliff:document:1.2%5C%22%3E%22 +%0A        %22%3Cstring name=%5C%22preposition_for_date%5C%22%3Eon %3Cxliff:g id=%5C%22date%5C%22 example=%5C%22May 29%5C%22%3E%25s%3C/xliff:g%3E%3C/string%3E%22 +%0A        %22%3C/resources%3E%22);%0A%0A    assertThat(resourceTable.getValue(new ResName(%22pkg:string/preposition_for_date%22), %22%22).getData())%0A        .isEqualTo(%22on %25s%22);%0A  %7D%0A%0A  @Test%0A  public void ignoresBTags() throws Exception %7B%0A    topLevelNodeHandler.addHandler(%22resources%22, new NodeHandler()%0A        .addHandler(%22item%5B@type='string'%5D%22, new StaxValueLoader(resourceTable, %22string%22, ResType.CHAR_SEQUENCE))%0A    );%0A%0A    parse(%22%3Cresources xmlns:xliff=%5C%22urn:oasis:names:tc:xliff:document:1.2%5C%22%3E%22 +%0A        %22%3Citem type=%5C%22string%5C%22 name=%5C%22sms_short_code_details%5C%22%3EThis %3Cb%3Emay cause charges%3C/b%3E on your mobile account.%3C/item%3E%22 +%0A        %22%3C/resources%3E%22);%0A%0A    assertThat(resourceTable.getValue(new ResName(%22pkg:string/sms_short_code_details%22), %22%22).getData())%0A        .isEqualTo(%22This may cause charges on your mobile account.%22);%0A  %7D%0A%0A  private void parse(String xml) throws XMLStreamException %7B%0A    XMLInputFactory factory = XMLInputFactory.newFactory();%0A    XMLStreamReader xmlStreamReader = factory.createXMLStreamReader(new StringReader(xml));%0A    staxDocumentLoader.doParse(xmlStreamReader, new XmlContext(%22pkg%22, Fs.fileFromPath(%22/tmp/fake.txt%22)));%0A  %7D%0A%7D

Add test for StaxValueLoader of strings.