Transform XML-File

C

Cengiz

Hi,

why using explicitly a XMLReader-instance for transforming a xml with
a xsl does not have the same result like using the default reader.

e.g:

1. with a explicit reader:
xslt.transform(new SAXSource(xmlReader,new InputSource(new
FileInputStream (responseFileName))), output);

2. with default reader:
xslt.transform(responseData, output);

the first output is an "xml"-File without tags, only values:
e.g: 12343 4324 etc
the second (with default) is a valid "xml"-File:
e.g: <NUMBER>12342</NUMBER> ...

How can i bring a reader to transform in a valid xml-File
 
E

Emanuel Bulic

I have seen that happen with stylesheets... but it was usually the a
stylesheet issue... The transformer was mathching xml tags with the
default template, which simply outputs the xml tag contents. If you
post the rest of the code (how you instantiated the transformer) I
might be able to help you. I have also seen bugs in the various
InputSource implementations. If you haven't done so already, consider
getting a more recent version of the transformer (xalan?).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top