Examples of XMLHandler


Examples of com.adobe.epubcheck.xml.XMLHandler

    try
    {
      // validate container
      in = ocf.getInputStream(OCFData.containerEntry);
      parser = new XMLParser(ocf, in, OCFData.containerEntry, "xml", getReport(), version);
      XMLHandler handler = new OCFHandler(parser);
      parser.addXMLHandler(handler);
      parser.addValidator(xmlValidatorMap.get(new OPSType(OCFData.containerEntry, version)));
      parser.process();
      try
      {
View Full Code Here

Examples of com.adobe.epubcheck.xml.XMLHandler

    {
      in = resourceProvider.getInputStream(path);
      XMLParser navParser = new XMLParser(ocf, in, path,
          "application/xhtml+xml", report, version);

      XMLHandler navHandler = new OPSHandler30(ocf, path, mimeType,
          properties, xrefChecker, navParser, report, version, pubTypes);
      navParser.addXMLHandler(navHandler);
      navParser.addValidator(XMLValidators.NAV_30_RNC.get());
      navParser.addValidator(XMLValidators.XHTML_30_SCH.get());
      navParser.addValidator(XMLValidators.NAV_30_SCH.get());
View Full Code Here

Examples of com.celexus.conniption.foreman.util.XMLHandler

  }

  public void update() throws UtilityException
  {
    TradeKingForeman foreman = new TradeKingForeman();
    XMLHandler handler = new XMLHandler();
    try
    {
      response = foreman.makeAPICall(MarketBuilder.getClock(ResponseFormat.XML));
    }
    catch (ForemanException e)
    {
      throw new UtilityException("Make API Call", e);
    }
    map = handler.parseMarketClock(response.toString());
  }
View Full Code Here

Examples of com.celexus.conniption.foreman.util.XMLHandler

  }

  public void update() throws UtilityException
  {
    TradeKingForeman foreman = new TradeKingForeman();
    XMLHandler handler = new XMLHandler();
    try
    {
      response = foreman.makeAPICall(OrdersBuilder.postOrder(account.getId(), b.build().toString(), ResponseFormat.XML));
    }
    catch (ForemanException e)
    {
      throw new UtilityException("Make API Call", e);
    }
    map = handler.parseMarketOrder(response.toString());
  }
View Full Code Here

Examples of com.celexus.conniption.foreman.util.XMLHandler

    map = parseQuote(response.toString());
  }

  public Map<MarketQuotesResponseField, String> parseQuote(String response) throws ModelException
  {
    XMLHandler handler = new XMLHandler();
    try
    {
      return handler.parseMarketQuote(response.toString());
    }
    catch (UtilityException e)
    {
      throw new ModelException("", e);
    }
View Full Code Here

Examples of com.celexus.conniption.foreman.util.XMLHandler

  }

  public void update() throws ModelException
  {
    TradeKingForeman foreman = new TradeKingForeman();
    XMLHandler handler = new XMLHandler();
    try
    {
      response = foreman.makeAPICall(OrdersBuilder.preview(a.getId(), b.build().toString(), ResponseFormat.XML));
    }
    catch (ForemanException | UtilityException e)
    {
      throw new ModelException("Make API Call", e);
    }

    try
    {
      map = handler.parseMarketOrderPreview(response.toString());
    }
    catch (UtilityException e)
    {
      throw new ModelException("", e);
    }
View Full Code Here

Examples of com.celexus.conniption.foreman.util.XMLHandler

    map = parseAccount(response.toString());
  }

  public Map<AccountsField, String> parseAccount(String res) throws ModelException
  {
    XMLHandler handler = new XMLHandler();
    try
    {
      return handler.parseAccount(response.toString());
    }
    catch (UtilityException e)
    {
      throw new ModelException("", e);
    }
View Full Code Here

Examples of com.esri.gpt.framework.http.XmlHandler

  LOGGER.finer("Reading metadata of source URI: \"" +sourceUri+ "\" through proxy: "+this);
  try {
    sourceUri = Val.chkStr(sourceUri).replaceAll("\\{", "%7B").replaceAll("\\}", "%7D");
    HttpClientRequest cr = new HttpClientRequest();
    cr.setUrl(info.newReadMetadataUrl(sourceUri));
    XmlHandler sh = new XmlHandler(false);
    cr.setContentHandler(sh);
    cr.setCredentialProvider(info.newCredentialProvider());
    cr.setBatchHttpClient(info.getBatchHttpClient());
    cr.execute();
    Document doc = sh.getDocument();
    XPath xPath = XPathFactory.newInstance().newXPath();
    Node node = (Node) xPath.evaluate(
        "/feed/entry",
        doc, XPathConstants.NODE);
    Node elementNode = null;
View Full Code Here

Examples of com.esri.gpt.framework.http.XmlHandler

   */
  private String read(BaseAtomInfo info,String url) throws IOException {
    try {
      HttpClientRequest cr = new HttpClientRequest();
      cr.setUrl(url);
      XmlHandler sh = new XmlHandler(false);
      cr.setContentHandler(sh);
      cr.setCredentialProvider(info.newCredentialProvider());
      cr.setBatchHttpClient(info.getBatchHttpClient());
      try {
        cr.execute();
      } catch (IOException e) {
        return "";
      }     
      Document doc = sh.getDocument();     
      String mdText = XmlIoUtil.domToString(doc);
      return mdText;
    } catch (TransformerException ex) {
      throw new IOException("Error accessing metadata. Cause: "+ex.getMessage());
    }
View Full Code Here

Examples of com.esri.gpt.framework.http.XmlHandler

  private String read(BaseAtomInfo info, String sourceUri) throws IOException {
    try {
      sourceUri = Val.chkStr(sourceUri).replaceAll("\\{", "%7B").replaceAll("\\}", "%7D");
      HttpClientRequest cr = new HttpClientRequest();
      cr.setUrl(info.newReadMetadataUrl(sourceUri));
      XmlHandler sh = new XmlHandler(false);
      cr.setContentHandler(sh);
      cr.setCredentialProvider(info.newCredentialProvider());
      cr.setBatchHttpClient(info.getBatchHttpClient());
      cr.execute();
      Document doc = sh.getDocument();
      XPath xPath = XPathFactory.newInstance().newXPath();
      Node node = (Node) xPath.evaluate(
          "/feed/entry",
          doc, XPathConstants.NODE);
      Node elementNode = null;
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.