Different input and output xml files [encoding]

Welcome. I write a little code that connect to ftp server, log in, than search an input xml file. That file is input for BufferedReader. This data are writing to local file. Im from poland and i wish use polish fonts and that fonts are broken in this output file (input is ok, it's write in editor that support utf-8 encodding)
Code of my program:
http://www.piotrkow.net.pl/~loko/xml_java/java_pyt.html
Input file:
http://www.piotrkow.net.pl/~loko/xml_java/agreeting[input].xml
Output file (totaly broken):
http://www.piotrkow.net.pl/~loko/xml_java/agreeting[output].xml
How do I fix this? Please help.
PS: Documentation used ftp libraries:
http://jvftp.sourceforge.net/docs/api/

Problem has been solved :)
--> http://www.piotrkow.net.pl/~loko/xml_java/java_solved.html

Similar Messages

  • XSLT Generation from input and output XML

    Is it possible to generate an XSL mapping file in Java if we have input and output XML.
    If yes, then how to achieve this when user defined functions are used during mapping?

    Hi Prateek,
    check the following links for Business connectors and adapter:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/3bc0401b778031e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/4fb240ac052817e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/6a/3f93404f673028e10000000a1550b0/frameset.htm
    Hope these help you.
    Regards,
    Anuradha.B

  • How to save input and output in file

    hi ni
    i have program that has some input and some output
    i try to save the input and output in file word office or excel like this
    error
    extended
    ideal
    value
    wq
    wp
    value
    xq
    xp
    0.857143
    0.7
    0.6
    2
    0.5
    1
    1
    thank in advace 
    best regards
    m.s
    lab view  2011
    hi ?Q>
    Solved!
    Go to Solution.
    Attachments:
    adder in exteded stochastic.vi ‏37 KB

    johnsold wrote:
    Read from and Write to Spreadsheet File VIs should do what you want.
    I did not take the time to try to decipher what your program is doing, but I think you could replace all those feedback nodes and Build Arrays with an integer data type and the Rotate function from the Numeric >> Data Manipulation palette.  You will still need one shift regsiter or rfeedback node for each of the four signals.
    You have duplicated code: Divide by 65535, multiply by 2, and subtact 1 followed by a > comparison.  Make that a subVI and place 4 instances on your block diagram.
    Those simple changes will make you diagram understandable, reduce its size to the size of a postcard, and make any future changes easier.
    Lynn
    thank
    hi ?Q>

  • How to control (the input and output) EXE file after I call it using exec?

    Hi,
    I knew that I can use runtime.exec() to call one EXE file, and this works. But this EXE has two characteristics:
    1. After this exe starts, it asks user to input number such as 1 or 2 onto computer screen, then press return. Then the exe will start the calculation.
    2. after it starts calculation, it prints 3 columns of numbers onto the screen.
    My two questions are:
    1. How to use java to input the number such as 1 or 2 automatically? this EXE can not work like this in DOS command line:
    C:> file.exe parameter
    The parameter is the number such as 1 or 2 that I wanna input.
    2. how to redirect the 3 columns of numbers from computer screen to txt file?
    My colleague can solve these two questions using Mathematica. So I know that definitely there is at least one solution for it. I just can not do it using Java. This wierd exe file bothered me a lot and I really wish that I can get help from someone in java community.
    Thank you!
    Tony

    When you call Runtime.exec, you get a Process object. (I presume something similar happens when you use ProcessBuilder.) Process has methods with names getOutput, getInput, and getError. These correspond to the standard input, standard output, and standard error streams of the spawned process.
    You can read and write to the process on the streams corresponding to input and output that the process writes to the console.
    [add]
    In fact, you should be grabbing and reading the output/error streams anyway, because of the points raised by the Traps article. Google "Java Runtime exec traps" and you'll probably get a link to this JavaWorld article, which describes common Runtime.exec problems and how to solve them.
    Edited by: paulcw on Jun 15, 2010 4:09 PM

  • SQL PLUS log input and output to file

    What is the way to log every activity in sqlplus, input and output to a file (interactively).
    I managed to do it using rlwrap and tee but the only problem is, it is displaying the password and logging it into file as well :D. I can remove it from the logfile but am unable to prevent from showing the password.
    I hope many might have wanted to do this, and some might have been succeeded. Please share your ideas!

    N:\tools>sqlplus siva
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 19 03:12:04 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password: password
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining optionsThe password is displayed on screen and it is in the log file as well.
    Here is the some environmental setup;
    I've installed cygwin with rlwrap package
    I've renamed the original sqlplus.exe to _sqlplus.exe
    I've placed mysqlplus.bat and sqlplus.bat in N:\tools and this location includes in the pathwhere sqlplus.bat contains
    @echo off
    rlwrap -a"Enter" mysqlplus.bat %*perhaps this is more related to linux commands but I want to log input and output of sqlplus!
    :)

  • Input and output to file

    Hi all java programmers:
    I've few questions about java
    1. I have complex number class(a+bi, f+di), how can I send those numbers in file("file1.txt")
    2. how can I read those numbers again from (file1.txt)file
    If anyone can help me, i'd appreciate..

    There is no "stock" class for this - it is being considered - but there are a number of 3rd party existing classes and approaches to writing one yourself. See this search list:
    http://www.google.com/search?num=100&hl=en&lr=lang_en&ie=ISO-8859-1&q=java+%22complex+number%22

  • Input and Output to file in an applet

    Is it possible to read and write data from and to a txt file when running an applet so that some initial data can be used in the applet program? Can I do the same thing as in applications? Where I just use FileInputStream/InputStreamReader classes and the FileOutputStream/OutputStreamWriter classes. Thanks.

    The answer is yes... and no. An applet can't (by default) access the host's operating system or file system. This is part of the built in security of the Java language. There are cases, though, where an applet can get access to the filesystem and that is through signed applets. To create a signed applet, just JAR your sourcecode into a *.jar file and use the jarsigner utility to generate a certificate for your jar file (and applet). I'm not completely up to date on what is and isn't allowed in signed applets, but a good place to find out is:
    http://java.sun.com/docs/books/tutorial/applet/problems/index.html

  • Selecting separate input and output devices!

    hi, i have logic pro 8 and cant find out how to select separate devises for input and output!
    for my output (and input when recording drums) i use a alesis multimix 16 (16 track firewire desc) but for recording guitars and bass and poss vocals i would like to use my line 6 x3 live as my input devise but still using the alesis for monitoring.
    is this possible? cant figure how to do it.
    any help is great help! cheers, Dan

    In Logic 9 you can easily select different input and output devices in the Preferences Devices area. In Logic 8 you must create an aggregate device -
    http://support.apple.com/kb/HT1215
    JG

  • Input and Output encoding do not match

    My input xml file's encoding is "ISO-8859-1".After manipulating the contents using DOM and transforming , the encoding of the Output xml file is changed to "UTF-8".
    Here is the source code:
    public static void main(String args[])
    try {
    InputStream xml_utf = new FileInputStream("C:\\backup\\07_23\\input_1.xml");
    InputSource inputSource = new InputSource(xml_utf);
    DOMParser parser = new DOMParser();
    try {
    parser.parse(inputSource);
    } catch (SAXException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    Document doc = parser.getDocument();
    Source source = new DOMSource(doc);
    Result result = new StreamResult(new FileWriter("C:\\backup\\07_23\\output_1_input2.xml"));
    Transformer xformer = null;
    try {
    xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(source, result);
    } catch (TransformerConfigurationException e) {
    e.printStackTrace();
    catch (TransformerException e) {
    e.printStackTrace();
    How can I set the encoding of the output back to "ISO-8859-1"?
    Thanks.

    transformer.setOutputProperty("encoding","ISO-8859-1")
    did the job...

  • XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • Wrong input and output files path?

    When i tried to run my code i got wrong path of input and output files, why it was and where is the mistake? I did not meant the path \tmp\xorout.txt and C:\jar\org\joone\samples\engine\xor\xor.txt in the source code - where are they from? :
    * XOR.java
    * Sample class to demostrate the use of the Joone's core engine
    * see the Developer Guide for more details
    * JOONE - Java Object Oriented Neural Engine
    * http://joone.sourceforge.net
    package org.joone.samples.engine.xor;
    import java.io.File;
    import org.joone.engine.*;
    import org.joone.engine.learning.*;
    import org.joone.io.*;
    import org.joone.net.NeuralNet;
    public class XOR implements NeuralNetListener {
    /** Creates new XOR */
    public XOR() {
    * @param args the command line arguments
    public static void main() {
    XOR xor = new XOR();
    xor.Go();
    public void Go() {
    * Firts, creates the three Layers
    LinearLayer input = new LinearLayer();
    SigmoidLayer hidden = new SigmoidLayer();
    SigmoidLayer output = new SigmoidLayer();
    input.setLayerName("input");
    hidden.setLayerName("hidden");
    output.setLayerName("output");
    /* sets their dimensions */
    input.setRows(2);
    hidden.setRows(3);
    output.setRows(1);
    * Now create the two Synapses
    FullSynapse synapse_IH = new FullSynapse(); /* input -> hidden conn. */
    FullSynapse synapse_HO = new FullSynapse(); /* hidden -> output conn. */
    synapse_IH.setName("IH");
    synapse_HO.setName("HO");
    * Connect the input layer whit the hidden layer
    input.addOutputSynapse(synapse_IH);
    hidden.addInputSynapse(synapse_IH);
    * Connect the hidden layer whit the output layer
    hidden.addOutputSynapse(synapse_HO);
    output.addInputSynapse(synapse_HO);
    FileInputSynapse inputStream = new FileInputSynapse();
    /* The first two columns contain the input values */
    inputStream.setAdvancedColumnSelector("1,2");
    /* This is the file that contains the input data */
    inputStream.setInputFile(new File("c:\\xor.txt"));
    input.addInputSynapse(inputStream);
    TeachingSynapse trainer = new TeachingSynapse();
    /* Setting of the file containing the desired responses,
    provided by a FileInputSynapse */
    FileInputSynapse samples = new FileInputSynapse();
    samples.setInputFile(new File("c:\\xor.txt"));
    /* The output values are on the third column of the file */
    samples.setAdvancedColumnSelector("3");
    trainer.setDesired(samples);
    /* Creates the error output file */
    FileOutputSynapse error = new FileOutputSynapse();
    error.setFileName("c:\\xorout.txt");
    //error.setBuffered(false);
    trainer.addResultSynapse(error);
    /* Connects the Teacher to the last layer of the net */
    output.addOutputSynapse(trainer);
    NeuralNet nnet = new NeuralNet();
    nnet.addLayer(input, NeuralNet.INPUT_LAYER);
    nnet.addLayer(hidden, NeuralNet.HIDDEN_LAYER);
    nnet.addLayer(output, NeuralNet.OUTPUT_LAYER);
    nnet.setTeacher(trainer);
              FileOutputSynapse results = new FileOutputSynapse();
    results.setFileName("c:\\results.txt");
    output.addOutputSynapse(results);
    // Gets the Monitor object and set the learning parameters
    Monitor monitor = nnet.getMonitor();
    monitor.setLearningRate(0.8);
    monitor.setMomentum(0.3);
    /* The application registers itself as monitor's listener
    * so it can receive the notifications of termination from
    * the net.
    monitor.addNeuralNetListener(this);
    monitor.setTrainingPatterns(4); /* # of rows (patterns) contained in the input file */
    monitor.setTotCicles(2000); /* How many times the net must be trained on the input patterns */
    monitor.setLearning(true); /* The net must be trained */
    nnet.go(); /* The net starts the training job */
    public void netStopped(NeuralNetEvent e) {
    System.out.println("Training finished");
    public void cicleTerminated(NeuralNetEvent e) {
    public void netStarted(NeuralNetEvent e) {
    System.out.println("Training...");
    public void errorChanged(NeuralNetEvent e) {
    Monitor mon = (Monitor)e.getSource();
    /* We want print the results every 200 cycles */
    if (mon.getCurrentCicle() % 200 == 0)
    System.out.println(mon.getCurrentCicle() + " epochs remaining - RMSE = " + mon.getGlobalError());
    public void netStoppedError(NeuralNetEvent e,String error) {
    ERROR:
    C:\jar>java -cp joone-engine.jar org.joone.samples.engine.xor.XOR C:\\xor.txt C:
    \\xorout.txt
    [main] [ERROR] - org.joone.io.FileOutputSynapse - IOException in Synapse 6. Mess
    age is : \tmp\xorout.txt (The system cannot find the path specified)
    Training...
    [Thread-0] [WARN] - org.joone.io.FileInputSynapse - IOException in Synapse 3. Me
    ssage is : C:\jar\org\joone\samples\engine\xor\xor.txt (The system cannot find t
    he path specified)
    [Thread-0] [WARN] - org.joone.io.FileInputSynapse - IOException in Synapse 3. Me
    ssage is : C:\jar\org\joone\samples\engine\xor\xor.txt (The system cannot find t
    he path specified)
    java.lang.NullPointerException
    at org.joone.io.StreamInputSynapse.getStream(StreamInputSynapse.java:176
    at org.joone.io.StreamInputSynapse.readAll(StreamInputSynapse.java:288)
    at org.joone.io.StreamInputSynapse.fwdGet(StreamInputSynapse.java:106)
    at org.joone.engine.Layer.fireFwdGet(Layer.java:212)
    at org.joone.engine.Layer.fwdRun(Layer.java:1225)
    at org.joone.net.NeuralNet.stepForward(NeuralNet.java:1015)
    at org.joone.net.NeuralNet.fastRun(NeuralNet.java:970)
    at org.joone.net.NeuralNet.fastRun(NeuralNet.java:937)
    at org.joone.net.NeuralNet$1.run(NeuralNet.java:890)
    at java.lang.Thread.run(Thread.java:534)

    c:xor.txt
    c:/xor.txt
    i think c:xor stands for somthing else like a virtual drive but ima not sure

  • Statistical forecasting....Input and Output at different levels? & MAD and MAPE calculations

    Team,
    Couple of questions on Statistical Forecasting...
    1) Is it possible to have input and output KF at different planning levels?...
    2) Is there anyway to see MAD and MAPE values for each Forecast run?
    Any help is appreciated....Thanks for your help...
    Thanks,
    Krishna

    Hi Krishna,
    #1 - The Inputs and Outputs should be at the same base planning level. Output should be a Stored KF. The input can be a calculated KF.
    To achieve input and output at different plan levels, you can do something like this:
    I/P KF1@PL1 (stored)   Output: KF3@PL2
    Create a Calculated KF: KF2@PL2 with calculation like SUM(KF1@PL1) and use this as input for StatFcst
    #2 - The result of Fcst run MAD cannot be seen from Excel Client yet, we will address this in near release. If you are on-premise, you can see the results in table: sap.sop.sopfnd.catalogue::SOPFCS_FORECAST_RUNTIME_INFO_TAB
    Hope this is useful.
    Thanks,
    Raghav

  • Create XML stream and stored as an output XML file

    Dear ALL,
    Could you help me in such situation?
    I need create XML file. I have DTD file. I create XML stream and stored as an output XML file. But all the data of my XML file stored in one line.
    How I can create my XML file according to DTD file?
    Thanks a lot.
    Best regards,
    Igor

    hi
    good
    go through this links,hope these would help you to solve your problem
    http://rustemsoft.com/JSPsample.htm
    http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.etools.xmlbuilder.doc/tasks/txmltask.htm
    thanks
    mrutyun^

  • 3.1 Input and Output File Repositories

    I am having an issue with setting the input and output file repositories in 3.1.
    When I go into the CMC under servers and select them I go to the bottom of the properties and change the File Store Directory location.
    Once I do that there is a second box that says Current: %DefaultInputFRSDir% and a note in Red that I must restart the server for settings to take effect.
    I have restarted all the BO services and restarted the physical server and yet the note remains and the setting doesn't appear to take effect.
    Does anyone know what I am doing wrong?
    Also, our repositories are on a file server, and in XI R2 we changed the services in Windows to run as a user account that had access to them. How do you do that in this version?

    Got it.
    Changed the ID used to run the SIA and everything is working now.

  • How can I use a different driver for audio input and output?

    I did a search of course, and came up with something about an aggregate. I have no idea what this is, how to do it, or if it would even work for me.
    What I am trying to do is:
    1) Record into Logic Express using my Tascam US-122.
    2) Have playback come out of my computer sound system, not the Tascam.
    If I go over to the Audio setup window, I can only record when the driver is set to Tascam US-122. Likewise, I can only listen to sound when my Built-In Audio is selected. It gets rather annoying going between the two.
    So, would this aggregate thing solve my problem? If so, how do I do it? Thanks for any help!
    -allen

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

Maybe you are looking for

  • Apogee ensemble firewire and thunderbolt

    Does Apogee Ensemble firewire  is compatible ith new mac pro 2014?

  • Variable reportCount might not have been initalized?

    import java.util.Scanner; import java.util.Random; public class Guessing     public static void main (String[] args)         final int max=10;         int answer,guess,reportCount;         Scanner scan = new Scanner (System.in);         Random genera

  • Unicode :  Chinese

    Hi ALL  , Recently we moved to Unicode , and we are facing problem with an interface program for citybank citybank -cityDirect  specification is based on the field position in the flat file,it identifies  fields from the field position. File is downl

  • Updating Website made in iWeb from a different computer/location

    I've created a wedding website for me and my fiance using iWeb on my computer - right now i'm in Greece and she is in Canada. She has a mac and iWeb but she would like to update our webpage on her computer. Is there a way she can change things and up

  • How do I read weblogic properties in my code

    Hi, I want to pick up the port number from my weblogic properties file and use it to set the context for the EJB's. Are there any weblogic API's that I can use to do this. I am trying to avoid hardcoding the port number anywhere in the code. Apprecia