[jdom-interest] Question about manipulating a document
Ramo At Skuff
ramo at skuff-band.de
Fri Feb 29 02:59:57 PST 2008
Hello,
i have a question about manipulating a document.
I have a method, something like this:
public void writeDocumentXML()
{
try {
final XMLOutputter output2 = new
XMLOutputter(Format.getPrettyFormat());
FileOutputStream fod2 = new
FileOutputStream(sqlFile);
output2.output(xmlDoc, fod2);
fod2.flush();
fod2.close();
} catch (IOException e) {
e.printStackTrace();
}
}
The output is something like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html" />.....
How can i manipulat the document, that i get something like this:
<?php phpinfo(); ?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html" />
So that the first line oft he document is not the xml-definition but the
php-definition?
Is there a way to handle it?
Many thanks!
Ramo
More information about the jdom-interest
mailing list