Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christopher Cottier
spring-conversion-xml-parser
Commits
2b45023b
Commit
2b45023b
authored
4 years ago
by
Christopher Cottier
Browse files
Options
Download
Email Patches
Plain Diff
xml scraping with groovy practice
parent
b4db64d9
master
classify
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.DS_Store
+0
-0
.DS_Store
out/production/spring-conversion-xml-parser/XMLParser.class
+0
-0
out/production/spring-conversion-xml-parser/XMLParser.class
out/production/spring-conversion-xml-parser/web.xml
+31
-0
out/production/spring-conversion-xml-parser/web.xml
src/XMLParser.groovy
+12
-0
src/XMLParser.groovy
src/web.xml
+31
-0
src/web.xml
with
74 additions
and
0 deletions
+74
-0
.DS_Store
0 → 100644
+
0
-
0
View file @
2b45023b
File added
This diff is collapsed.
Click to expand it.
out/production/spring-conversion-xml-parser/XMLParser.class
0 → 100644
+
0
-
0
View file @
2b45023b
File added
This diff is collapsed.
Click to expand it.
out/production/spring-conversion-xml-parser/web.xml
0 → 100644
+
31
-
0
View file @
2b45023b
<?xml version="1.0" encoding="UTF-8" ?>
<web-app
xmlns=
"http://java.sun.com/xml/ns/javaee"
version=
"2.5"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
<!-- The definition of the Root Spring Container shared by all Servlets, basically provides parameters to the entire web application-->
<!--see https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch19s02.html-->
<context-param>
<!--param gives the location of the root context.-->
<param-name>
contextConfigLocation
</param-name>
<param-value>
/WEB-INF/web-context.xml
</param-value>
</context-param>
<!-- root web-application-context for the web-application and puts it in the ServletContext-->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>
dispatcher
</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>
1
</load-on-startup>
</servlet>
<!-- specifies which java servlet should be invoked for a url-->
<servlet-mapping>
<servlet-name>
dispatcher
</servlet-name>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
</web-app>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/XMLParser.groovy
+
12
-
0
View file @
2b45023b
import
groovy.xml.XmlSlurper
def
webApp
=
new
XmlSlurper
().
parse
(
"./web.xml"
)
//assert webApp instanceof groovy.util.Node
def
listenerClass
=
webApp
.
'listener'
.
'listener-class'
.
toString
()
println
(
listenerClass
)
def
listenerClass2
=
webApp
[
'@version'
]
println
(
listenerClass2
)
This diff is collapsed.
Click to expand it.
src/web.xml
0 → 100644
+
31
-
0
View file @
2b45023b
<?xml version="1.0" encoding="UTF-8" ?>
<web-app
xmlns=
"http://java.sun.com/xml/ns/javaee"
version=
"2.5"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>
<!-- The definition of the Root Spring Container shared by all Servlets, basically provides parameters to the entire web application-->
<!--see https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch19s02.html-->
<context-param>
<!--param gives the location of the root context.-->
<param-name>
contextConfigLocation
</param-name>
<param-value>
/WEB-INF/web-context.xml
</param-value>
</context-param>
<!-- root web-application-context for the web-application and puts it in the ServletContext-->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>
dispatcher
</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>
1
</load-on-startup>
</servlet>
<!-- specifies which java servlet should be invoked for a url-->
<servlet-mapping>
<servlet-name>
dispatcher
</servlet-name>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
</web-app>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help