• 周二. 8月 9th, 2022

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

where is a problem? – Java From 5gw.org

[db:作者]

4月 10, 2022

xmlns=”http://www.w3.org/1999/xhtml” dir=”ltr” lang=”en”>
where is a problem? – Java
/**
* Bytes CSS
* Style: ‘bytes.answers’; Style ID: 18
*/
@import url(“/clientscript/vbulletin_css/style-12635a82-00018.css”);

 
 
470,371 Members | 1,560 Online

where is a problem?

Hi all,
i try to convert xml into pdf. i found fop converter.
i try following code:

public void convertXML2FO(xml, xslt, fo){

OutputStream out = new FileOutputStream(fo);

try{

//this line of code didn’t pass
Transformerfactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(new StreamSource(xslt));

Source src = new javax.xml.transform.stream.StreamSource(xml);
Result res = new StreamResult(out);

t.transform(src, res);
}
….

i imported all classes that i need.

import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
thanks!

Jul 17 ’05
#1

2 3168


(adsbygoogle = window.adsbygoogle || []).push({});

"mali djuro" <ma***************@net.hr> wrote in message
news:be***********@as201.hinet.hr…

Hi all,
i try to convert xml into pdf. i found fop converter.
i try following code:

public void convertXML2FO(xml, xslt, fo){

OutputStream out = new FileOutputStream(fo);

try{

//this line of code didn’t pass
Transformerfactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(new StreamSource(xslt));

Source src = new javax.xml.transform.stream.StreamSource(xml);
Result res = new StreamResult(out);

t.transform(src, res);
}

i imported all classes that i need.

import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
thanks!

i forgot to say i got message

Uncaught exception
(java.lang.NoClassDefFoundError:
javax.xml.transform.TransformerFactory)

thanks!

Jul 17 ’05
#2

mali djuro wrote:

"mali djuro" <ma***************@net.hr> wrote in message
news:be***********@as201.hinet.hr…

Hi all,
i try to convert xml into pdf. i found fop converter.
i try following code:

public void convertXML2FO(xml, xslt, fo){

OutputStream out = new FileOutputStream(fo);

try{

//this line of code didn’t pass
Transformerfactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer(new StreamSource(xslt));

Source src = new javax.xml.transform.stream.StreamSource(xml);
Result res = new StreamResult(out);

t.transform(src, res);
}

i imported all classes that i need.

import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
thanks!

i forgot to say i got message

Uncaught exception
(java.lang.NoClassDefFoundError:
javax.xml.transform.TransformerFactory)

thanks!

It seems to me that the javax.xml.transform package is not in your
classpath.

Jul 17 ’05
#3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics


3 posts

views

Thread by A.V.C. |
last post: by


10 posts

views

Thread by Ray Stevens |
last post: by


41 posts

views

Thread by Miroslaw Makowiecki |
last post: by


1 post

views

Thread by perto1 |
last post: by


reply

views

Thread by cosinus |
last post: by

By using this site, you agree to our Privacy Policy and Terms of Use.


(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-90111-7’, ‘bytes.com’);
ga(‘send’, ‘pageview’);

loadBytesTracking()

//0){location.replace(‘https://bytes.com/showthread.php?p=’+cpostno);};} }

if(typeof window.orig_onload == “function”) window.orig_onload();
}

//]]>

发表评论

您的电子邮箱地址不会被公开。