/** * Constructs a message bundle from input xml (fetched from an external file). * * @param locale The LocaleSpec element that this bundle was constructed from. * @param xml The content of the remote file. * @throws SpecParserException if parsing fails. */ public MessageBundle(LocaleSpec locale, String xml) throws SpecParserException { Element doc; try { doc = XmlUtil.parse(xml); } catch (XmlException e) { throw new SpecParserException("Malformed XML in file " + locale.getMessages() + ": " + e.getMessage()); } messages = parseMessages(doc); languageDirection = locale.getLanguageDirection(); }
/** * Constructs a message bundle from input xml (fetched from an external file). * * @param locale The LocaleSpec element that this bundle was constructed from. * @param xml The content of the remote file. * @throws SpecParserException if parsing fails. */ public MessageBundle(LocaleSpec locale, String xml) throws SpecParserException { Element doc; try { doc = XmlUtil.parse(xml); } catch (XmlException e) { throw new SpecParserException("Malformed XML in file " + locale.getMessages() + ": " + e.getMessage()); } messages = parseMessages(doc); languageDirection = locale.getLanguageDirection(); }
/** * Constructs a message bundle from input xml (fetched from an external file). * * @param locale The LocaleSpec element that this bundle was constructed from. * @param xml The content of the remote file. * @throws SpecParserException if parsing fails. */ public MessageBundle(LocaleSpec locale, String xml) throws SpecParserException { Element doc; try { doc = XmlUtil.parse(xml); } catch (XmlException e) { throw new SpecParserException("Malformed XML in file " + locale.getMessages() + ": " + e.getMessage()); } messages = parseMessages(doc); languageDirection = locale.getLanguageDirection(); }