@Test public void testBuildFromTextJP() throws Exception { text = "<?xml version='1.0' encoding='UTF-8'?>\n" + "<resources>\n" + " <!--comment-->\n" + " <string name=\"name\">コンテンツ</string>\n" + "</resources>"; document = AndroidStringDocumentReader.fromText(text); assertThat(document).isNotNull(); assertThat(document.getSingulars()).hasSize(1); AndroidSingular singular = document.getSingulars().get(0); assertThat(singular.getComment()).isEqualTo("comment"); assertThat(singular.getName()).isEqualTo("name"); assertThat(singular.getContent()).isEqualTo("コンテンツ"); }
public static AndroidStringDocument fromText(String text) throws ParserConfigurationException, IOException, SAXException { return buildFromDocument(documentBuilder().parse(new InputSource(new StringReader(Strings.nullToEmpty(text))))); }
AndroidStringDocumentReader { public static AndroidStringDocument fromText(String text) throws ParserConfigurationException, IOException, SAXException { return buildFromDocument(documentBuilder().parse(new InputSource(new StringReader(Strings.nullToEmpty(text))))); } }
AndroidStringDocumentReader { public static AndroidStringDocument fromText(String text) throws ParserConfigurationException, IOException, SAXException { return buildFromDocument(documentBuilder().parse(new InputSource(new StringReader(Strings.nullToEmpty(text))))); }  }
AndroidStringDocumentReader { public static AndroidStringDocument fromText(String text) throws ParserConfigurationException, IOException, SAXException { return buildFromDocument(documentBuilder().parse(new InputSource(new StringReader(Strings.nullToEmpty(text))))); }  static AndroidStringDocument fromFile(String fileName); static AndroidStringDocument fromText(String text); }
AndroidStringDocumentReader { public static AndroidStringDocument fromText(String text) throws ParserConfigurationException, IOException, SAXException { return buildFromDocument(documentBuilder().parse(new InputSource(new StringReader(Strings.nullToEmpty(text))))); }  static AndroidStringDocument fromFile(String fileName); static AndroidStringDocument fromText(String text);  }