You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Patrice Le Cozler <pl...@dexem.com> on 2002/05/03 11:08:13 UTC

generating tag

hello,

I'm working on a webapp that generates XML scripts but the parser for
those scripts requires that the  <!DOCTYPE ... > tag is present after
the <?xml ...> tag.
Is there any Class/method wich allows to do that ?

thanks for responses


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: generating tag

Posted by Jeff Turner <je...@socialchange.net.au>.
On Fri, May 03, 2002 at 11:08:13AM +0200, Patrice Le Cozler wrote:
> hello,
> 
> I'm working on a webapp that generates XML scripts but the parser for
> those scripts requires that the  <!DOCTYPE ... > tag is present after
> the <?xml ...> tag.
> Is there any Class/method wich allows to do that ?

Depends entirely on how you are generating the XML files.

As a string:
    stringbuf.append("<!DOCTYPE foo SYSTEM 'file:/foo.dtd'>");
As a JDOM:
    doc.setDoctype("foo", "file:/foo.dtd");

If you've got an incoming byte stream and want to add a DOCTYPE
declaration, I wrote a class to do this:

http://opensource.socialchange.net.au/doctypechanger


--Jeff

> 
> thanks for responses
> 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>