Package net.n3.nanoxml

Examples of net.n3.nanoxml.IXMLReader


            log.debug(new String(out.toByteArray()));
        // #endif

        try {
            IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
            IXMLReader reader = StdXMLReader.stringReader(new String(out.toByteArray(), "UTF8")); //$NON-NLS-1$
            parser.setReader(reader);
            IXMLElement rootElement = (IXMLElement) parser.parse();

            if (!rootElement.getName().equalsIgnoreCase("multistatus")) //$NON-NLS-1$
                throw new IOException(Messages.getString("MultiStatusResponse.invalidDavRootElement") + rootElement.getName()); //$NON-NLS-1$
View Full Code Here


       try{
         try {
           IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
           // IXMLReader reader = StdXMLReader.fileReader(file); // fails on pc
           BufferedReader breader = new BufferedReader(new FileReader(file));
           IXMLReader reader = new StdXMLReader(breader);
           parser.setReader(reader);
           el = (XMLElement) parser.parse();
           if (el == null) {
             el = promptToOverwrite(xmlFile, tag);
           } else {
View Full Code Here

        ch = st.read();
      }
IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
Reader breader = new StringReader(xmlText);
IXMLReader reader = new StdXMLReader(breader);
parser.setReader(reader);
el = (XMLElement) parser.parse();
      return el;
    }
View Full Code Here

        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " Crear movimiento");
        Shared.itemsNeeded = new LinkedList<XMLElement>();

        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(xmlMovement);
        parser.setReader(reader);
        IXMLElement xml = (IXMLElement) parser.parse();

        System.out.println(xml.getName());
View Full Code Here

    static void createItems(Connection c, String ansDescriptions, boolean checkReason) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException {

        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " Crear articulos");
        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(ansDescriptions);
        parser.setReader(reader);
        System.out.println("Recibido " + ansDescriptions);
        IXMLElement xml = (IXMLElement) parser.parse();

        parser = null;
View Full Code Here

    }

    static void setPrices(Connection c, String ansPricesDiscounts) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException {
        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " Fijar precios");
        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(ansPricesDiscounts);
        parser.setReader(reader);
        IXMLElement xml = (IXMLElement) parser.parse();

        PreparedStatement stmtUpdate = c.prepareStatement("update articulo set descuento = ? where codigo = ? ");
        PreparedStatement stmtDelete = c.prepareStatement("delete from precio where codigo_de_articulo = ? and fecha = curdate() ");
View Full Code Here

    static String getInitialStock(Connection c, String xmlMovement) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException, IOException{
        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " Obtener stock inicial");
        Shared.itemsNeeded = new LinkedList<XMLElement>();

        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(xmlMovement);
        parser.setReader(reader);
        IXMLElement xml = (IXMLElement) parser.parse();

        System.out.println(xml.getName());
        String lastMovement = null;
View Full Code Here

        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " Actualizar lista de empleados");
        c.setAutoCommit(false);

        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(xmlEmployees);
        parser.setReader(reader);
        IXMLElement xml = (IXMLElement) parser.parse();

        PreparedStatement stmt = c.prepareStatement("truncate empleado");
        stmt.executeUpdate();
View Full Code Here

    static void updateFlagc(String daysFlagc, Connection c) throws ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException, SQLException {
       
        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " updateFlagc ");
        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(daysFlagc);
        parser.setReader(reader);
        IXMLElement xml = (IXMLElement) parser.parse();

        PreparedStatement stmt = c.prepareStatement("update dia_operativo set compensado = 1 where concat(mid(fecha,1,4),mid(fecha,6,2),mid(fecha,9,2)) = ?");
        for (Object x : xml.getChildren()) {
View Full Code Here

    static void updateItems(String descriptions, Connection c) throws ClassNotFoundException, InstantiationException, IllegalAccessException, XMLException, SQLException {
       
        System.out.println("[" + Shared.now() + "] Driver de conexiones " + Shared.lineNumber() " updateItems");
        IXMLParser parser = XMLParserFactory.createDefaultXMLParser();
        IXMLReader reader = StdXMLReader.stringReader(descriptions);
        parser.setReader(reader);
        System.out.println("Recibido " + descriptions);
        IXMLElement xml = (IXMLElement) parser.parse();

        parser = null;
View Full Code Here

TOP

Related Classes of net.n3.nanoxml.IXMLReader

Copyright © 2018 www.massapicom. 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.