![]() ![]() You already know how to insert a text string. It seems it is not possible to change the METHOD property during the transformation process. Note: I tried to change the "METHOD" property to "text" before calling "characters" but it does not work. in the real program, this buffer is built by an auxilliary TransformHandler Th.startElement("", "foo", "foo", new AttributesImpl()) Th.getTransformer().setOutputProperty(OutputKeys.METHOD, "xml") Th.getTransformer().setOutputProperty(OutputKeys.INDENT, "yes") Th.getTransformer().setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes") TransformerHandler th = stf.newTransformerHandler() SAXTransformerFactory stf = (SAXTransformerFactory) So my question is "how is it possible to inject plain xml syntax in the output of a TransformHandler" ?īyteArrayOutputStream out = new ByteArrayOutputStream() I use the "characters" method but the problem is that all the tags from the buffer are modified using <, > instead of "" in the output ! When I reach the end of, I complete the element and I thought I would only have to "dump" the buffer in the main TransformHandler and to carry on. When I reach, I create an auxilliary TranformHandler which uses a buffer as an output. To get the transformation I use a TransformHandler. contents being merely similar to with some changes in the attributes, same for,. I need to translate an XML proprietary file into an XMI file. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE). ![]() 3.8K Java and JavaScript in the Database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |