Examples of MXParser


Examples of org.xmlpull.mxp1.MXParser

      final Nifty nifty) throws Exception {
    try {
      long start = timeProvider.getMsTime();
      log.info("loading new nifty xml file with schemaId [" + schemaId + "]");

      XmlParser parser = new XmlParser(new MXParser());
      parser.read(inputStreamXml);

      NiftyType niftyType = (NiftyType) getSchema(schemaId).loadXml(parser);
      niftyType.loadStyles(this, nifty);
      niftyType.loadControls(this);
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

      final String styleFilename,
      final NiftyType niftyType,
      final Nifty nifty) throws Exception {
    log.info("loading new nifty style xml file [" + styleFilename + "] with schemaId [" + schemaId + "]");

    XmlParser parser = new XmlParser(new MXParser());
    InputStream stream = ResourceLoader.getResourceAsStream(styleFilename);
    try {
      parser.read(stream);
      NiftyStylesType niftyStylesType = (NiftyStylesType) getSchema(schemaId).loadXml(parser);
      niftyStylesType.loadStyles(this, niftyType, nifty, log);
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

      final String schemaId,
      final String controlFilename,
      final NiftyType niftyType) throws Exception {
    log.info("loading new nifty controls xml file [" + controlFilename + "] with schemaId [" + schemaId + "]");

    XmlParser parser = new XmlParser(new MXParser());
    InputStream stream = ResourceLoader.getResourceAsStream(controlFilename);
    try {
      parser.read(stream);
      NiftyControlsType niftyControlsType = (NiftyControlsType) getSchema(schemaId).loadXml(parser);
      niftyControlsType.loadControls(this, niftyType);
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

  }

  public void registerSchema(final String schemaId, final InputStream inputStreamSchema) throws Exception {
    try {
      Schema niftyXmlSchema = new Schema();
      XmlParser parser = new XmlParser(new MXParser());
      parser.read(inputStreamSchema);
      parser.nextTag();
      parser.required("nxs", niftyXmlSchema);
      schemes.put(schemaId, niftyXmlSchema);
    } finally {
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

      final XmlParser xmlParser,
      final Attributes attributes) throws Exception {
    String filename = attributes.get("filename");

    Schema niftyXmlSchema = new Schema();
    XmlParser parser = new XmlParser(new MXParser());
    InputStream stream = ResourceLoader.getResourceAsStream(filename);
    try {
      parser.read(stream);
      parser.nextTag();
      parser.required("nxs", niftyXmlSchema);
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

        super(nameCoder);
    }

    @Override
    protected XmlPullParser createParser() {
        return new MXParser();
    }
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

    /**
     * @deprecated As of 1.4, use {@link XppDom#build(XmlPullParser)} instead
     */
    @Deprecated
    public static Xpp3Dom build(final Reader reader) throws Exception {
        final XmlPullParser parser = new MXParser();
        parser.setInput(reader);
        try {
            return (Xpp3Dom)XppDom.build(parser);
        } finally {
            reader.close();
        }
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

        super(nameCoder);
    }

    @Override
    protected XmlPullParser createParser() {
        return new MXParser();
    }
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

    public List<IconDef> getIcons() { return icons; }
    public IconSetExtension(IConfigurationElement element) {
      type = element.getName();
      id = element.getAttribute(ID_ATTRIBUTE);
      icondef = element.getAttribute(ICONDEF_ATTRIBUTE);
      MXParser parser = new MXParser();
      Bundle bundle = Platform.getBundle(element.getDeclaringExtension().getNamespaceIdentifier());
      URL icondefurl = FileLocator.find(bundle,new Path(icondef),null);
      IPath path2 = new Path(icondef).removeLastSegments(1);
      URL path2url = FileLocator.find(bundle,path2,null);
      String path = icondefurl.getPath();
      logger.finer("path: " + path);
      logger.finer("path2url: " + path2url.toString());
      try {
        URL url = FileLocator.resolve(path2url);
        logger.finer("path2url-resolved: " + url.toString());
        rootpath = url.toString();
      } catch (IOException e1) {
        e1.printStackTrace();
      }
      try {
        parser.setInput(icondefurl.openStream(),"UTF-8");
        parseIconDef(parser);
      } catch (XmlPullParserException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
View Full Code Here

Examples of org.xmlpull.mxp1.MXParser

    return RecordType.fromString(name) != null;
  }

  public SXEMessage parseMessage(String raw) throws XmlPullParserException,
      IOException {
    XmlPullParser xpp = new MXParser();
    xpp.setInput(new ByteArrayInputStream(raw.getBytes("UTF-8")), "UTF-8");
    return parseMessage(xpp);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.