Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
c47429ad
Commit
c47429ad
authored
10 years ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
False comment removed
parent
4df3b8b5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sda1/Etest/SaxMemo2Html/Saxmemo2html/src/test/java/de/hdm_stuttgart/de/testing/dom/ConversionTest.java
+35
-3
35 additions, 3 deletions
.../java/de/hdm_stuttgart/de/testing/dom/ConversionTest.java
with
35 additions
and
3 deletions
Sda1/Etest/SaxMemo2Html/Saxmemo2html/src/test/java/de/hdm_stuttgart/de/testing/dom/ConversionTest.java
+
35
−
3
View file @
c47429ad
...
...
@@ -26,9 +26,43 @@ public abstract class ConversionTest {
protected
ConversionTest
(
final
String
xmlInputFileName
,
final
String
extension
)
{
this
.
xmlInputFileName
=
xmlInputFileName
;
this
.
htmlOutputFileName
=
xmlInputFileName
+
extension
;
PrintStream
out
;
try
{
System
.
err
.
println
(
"of="
+
htmlOutputFileName
);
out
=
new
PrintStream
(
htmlOutputFileName
);
}
catch
(
FileNotFoundException
e1
)
{
errorInitString
=
"Unable to open file '"
+
htmlOutputFileName
+
"' for writing"
;
return
;
}
Memo2Html
memo2html
;
try
{
memo2html
=
new
Memo2Html
(
out
);
}
catch
(
SAXException
|
ParserConfigurationException
e2
)
{
e2
.
printStackTrace
();
return
;
}
try
{
memo2html
.
parse
(
xmlInputFileName
);
}
catch
(
IOException
e1
)
{
errorInitString
=
"Unable parse file '"
+
xmlInputFileName
+
"'"
;
return
;
}
catch
(
SAXException
e
)
{
e
.
printStackTrace
();
}
final
SAXBuilder
parser
=
new
SAXBuilder
();
try
{
htmlRootElement
=
parser
.
build
(
htmlOutputFileName
).
getRootElement
();
}
catch
(
JDOMException
|
IOException
e1
)
{
errorInitString
=
"Unable to parse file '"
+
htmlOutputFileName
+
"', see stack trace for further information"
;
e1
.
printStackTrace
();
}
out
.
close
();
}
public
final
String
xmlInputFileName
,
htmlOutputFileName
;
// To be statically initialized in derived class
public
final
String
xmlInputFileName
,
htmlOutputFileName
;
protected
String
errorInitString
=
null
;
protected
Element
htmlRootElement
;
...
...
@@ -54,7 +88,6 @@ public abstract class ConversionTest {
try
{
memo2html
=
new
Memo2Html
(
out
);
}
catch
(
SAXException
|
ParserConfigurationException
e2
)
{
// TODO Auto-generated catch block
e2
.
printStackTrace
();
return
;
}
...
...
@@ -64,7 +97,6 @@ public abstract class ConversionTest {
errorInitString
=
"Unable parse file '"
+
xmlInputFileName
+
"'"
;
return
;
}
catch
(
SAXException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
final
SAXBuilder
parser
=
new
SAXBuilder
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment