Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Most of the given solutions start with the xml code as a string saved in a variable. However I am working with .xml files.
- 2. No program works on different types of xml files.
- 3. I am trying to convert xml config files occurring in various java programs so that I can learn from their various attributes. (By learn I mean run a ML algorithm on the collected features.)0
- <?xml version='1.0' encoding='UTF-8'?>
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="hbm2ddl.auto">create</property>
- <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
- <property name="connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
- <property name="connection.username">system</property>
- <property name="connection.password">oracle</property>
- <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
- <mapping class="com.javatpoint.Employee"/>
- </session-factory>
- </hibernate-configuration>
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <context:component-scan
- base-package="com.cde"/>
- <mvc:annotation-driven />
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <!-- Example: a logical view name of 'showMessage' is mapped to '/WEB-INF/jsp/showMessage.jsp' -->
- <property name="prefix" value="/WEB-INF/view/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
- <bean id="ds"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="undefined" />
- <property name="url" value="jdbc:mysql://localhost:2123/JDBCtemplatejava" />
- <property name="username" value="root" />
- <property name="password" value="password-1" />
- </bean>
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="ds"></property>
- </bean>
- <bean id="edao" class="com.cde.dao.EmployeeDao">
- <property name="jdbcTemplate" ref="jdbcTemplate"></property>
- </bean>
- </beans>
Add Comment
Please, Sign In to add comment