The stylesheet line you mention is a processing instruction in XML terms. You can do this in dom4j as follows...
Map arguments = new HashMap(); args.put( "type", "text/xsl" ); args.put( "href", "blah.xsl" ); Document doc = ...; doc.addProcessingInstruction( "xml:stylesheet", args ); James ----- Original Message ----- From: "Lea Allison" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 03, 2002 9:19 AM Subject: [dom4j-user] Adding a stylesheet element > Hi > > Does anyone know how I can add the stylesheet processing element to an XML > document? > > eg: I have an XML doc, I want to load it in, add the stylesheet line and > then save... > <?xml version="1.0" encoding="ISO-8859-1" ?> > .. add here <?xml:stylesheet type="text/xsl" href="blah.xsl" ?> > <DOCUMENT> > <H>Hello World</H> > </DOCUMENT> > > > Thanks > > Lea > > _______________________________________________ > dom4j-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/dom4j-user _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
