public static void main(String[] args) { try { java.io.File f = new java.io.File(args[0]); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(f); doc.getDocumentElement().normalize(); NodeList constL = doc.getElementsByTagName("Constant"); Node c = constL.item(0); if (c.getNodeType() == Node.ELEMENT_NODE) { Constant constC = new Constant((Element)c, FieldMetaInfo.Optype.CONTINUOUS, null); System.err.println("Value of first constant: " + constC.getResult(null)); } } catch (Exception ex) { ex.printStackTrace(); } }
result = new Constant((Element)expression, opType, fieldDefs); } else if (name.equals("FieldRef")) {
result = new Constant((Element)expression, opType, fieldDefs); } else if (name.equals("FieldRef")) {
public static void main(String[] args) { try { java.io.File f = new java.io.File(args[0]); javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder(); org.w3c.dom.Document doc = db.parse(f); doc.getDocumentElement().normalize(); NodeList constL = doc.getElementsByTagName("Constant"); Node c = constL.item(0); if (c.getNodeType() == Node.ELEMENT_NODE) { Constant constC = new Constant((Element)c, FieldMetaInfo.Optype.CONTINUOUS, null); System.err.println("Value of first constant: " + constC.getResult(null)); } } catch (Exception ex) { ex.printStackTrace(); } }