� problem: Outputting XML to a browser and file

Hi, thanks in advance for any help,
I have a program that produces xml needs to output it to a file and to the browser. Producing the xml is fine but the outputting part is giving me some problems:
1. On ouputting to the browser, MSIE is complaining that the � symbol is an invalid character. I have tried wrapping it in CDATA tags but to no avail.
2. On outputting to the file I am getting all ' symbols replaced by ' which isn't suitable either.
I was wondering how I could set these formats so I get pure text out to the file but unicode encodings for browser.
Below I have specified the code for outputting to the browser first and to a file second.
Cheers.
private void sendXML(HttpServletResponse pHttpServletResponse, Document pDocument) throws IOException{
pHttpServletResponse.setContentType("text/xml");
Writer lOut = pHttpServletResponse.getWriter();
OutputFormat lFormat = new OutputFormat(pDocument, "UTF-8", true );
XMLSerializer lSerial = new XMLSerializer(lOut, lFormat);
lSerial.asDOMSerializer();
lSerial.serialize(pDocument);
lOut.close();
private void writeDoc2File(Document pDocument, String pFilepath){
try{
Transformer xsltIdentity = TransformerFactory.newInstance().newTransformer();
DOMSource domSource = new DOMSource(pDocument);
StringWriter stringWriter = new StringWriter();
StreamResult streamResult = new StreamResult(stringWriter);
xsltIdentity.transform(domSource, streamResult);
String xmlnode = stringWriter.toString();
RandomAccessFile lRAF = new RandomAccessFile(pFilepath, "rw");
lRAF.setLength(0);
lRAF.seek(0);
lRAF.writeBytes(xmlnode);
lRAF.close();
catch(IOException e){
cLOG.debug(e.getMessage(), e);
catch(Exception e){
cLOG.debug(e.getMessage(), e);
}

I've just noticed that this site has a similar problem! The character I am having problems with is the UK pound symbol.

Similar Messages

  • Web browsing and file downloads stops

    Hi Guys,
    I've been looking at a few posts but not seen the answer yet.  I'd be grateful if someone could help me out or point me in the right direction.
    I had BT Infinity 2 installed with the HH5 on Friday.  I have problems with browsing web pages.  When I click a link most of the time the page loads quickly without issue, but then occassionally the page wont load and the page will 'stick'.  It sometimes take 30-60 seconds for the page to fully load, or there is a timeout.  Usually, by reloading the page it resolves this and the page loads really quickly again but within a minute you will have the same issue.
    Also, I have downloaded a few files, from 300mb to 1gb.  Just like web browsing, the file download will stop and the only way to resume the download is to reboot the HH5.  I had to reboot the HH5 five times to download the full 1gb file.  I checked the connection and it's not dropping so I wonder why the connection just stops or sticks for a while.
    I know it can take a while for the connection to settle down but it shouldn't stop working.
    Am hoping someone could help me out with this as i need this for my business.
    With thanks,

    I would leave it alone for the next few days and do not keep restarting the Homehub. This will cause DLM (Dynamic Line Management) to kick in and lower your speeds because it will interpret the restarts as a fault. It is normal for the speeds to fluctuate during the training period. If things do not improve after the ten day training period post back for more advice.

  • Problem when I click the "browse to file" icon in the property inspector

    Please somebody help me. I am having a problem with Dreamweaver. When ever I click on the "browse to file" icon in the property inspector, it opens up a full size window on top of the Dreamweaver screen that can't be resize. This problem just started. I have shut down my entire system and restarted it and I am still having the problem. Can someone please help me. Thank-you

    When irregular things begin to happen in DW, it's usually caused by a corrupted cache file.  Below you'll find details on how to delete it.
    http://forums.adobe.com/thread/494811
    Nancy O.

  • Output Binary data to browser as file

    I know this has been covered a thousand time, but every
    example I am given does not work.
    I am accessing a Java WebService to get a document (in this
    case PDF). This WS has no WDSL, so I am hitting it through CFHTTP.
    The WS returns me a hashmap with error codes etc. One element is a
    Binary string.
    I have done everything imaginable and the most I can do is
    get the raw text to display. Unfortunately, saving a temp file then
    using CFFILE is not an option for security reasons; however, if I
    try this the file is corrupted and will not open. When I use
    CFHEADER I get a complaint about java.lang.String. However,
    ToBinary gives me a CF error with garbage text and no real error,
    and BinaryDecode always whines about input and output encodings not
    matching.
    This is what I use the call the service:
    <CFHTTP URL="HIDDEN" METHOD="GET" RESULT="testFN"
    CHARSET="ISO-8859-1"></CFHTTP>
    And these are somethings I have tried:
    <cfheader name="Content-Type" value="pdf">
    <CFHEADER NAME="Content-Disposition" VALUE="inline;
    filename=my.pdf">
    <CFCONTENT TYPE="application/pdf"
    VARIABLE="#BinaryDecode(testFN.Filecontent, "Base64")#">
    <cfscript>
    context = getPageContext();
    context.setFlushOutput(false);
    response = context.getResponse().getResponse();
    out = response.getOutputStream();
    response.setContentType("application/pdf");
    response.setContentLength(arrayLen(testFN.Filecontent));
    out.write(testFN.Filecontent);
    out.flush();
    out.close();
    </cfscript>
    <cfcontent type="application/pdf; charset=ISO-8859-1">
    <CFSCRIPT>
    writeOutput(toString(testFN.Filecontent));
    </cfscript>
    None work. I either get a blank page, a CF error, or plain
    text. Other Java application use this same WS without issue, so any
    complaints about the WS have been ignored.
    I need help badly. I am not sure what else to try.

    Thanks for the reply.
    I have had problems using BinaryDecode. It states the input
    and output are not the same not matter what I use as the
    binaryencoding. I can get a pdf binary object sent to the browser
    by using this:
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=#fileNAME#.#fileEXT#">
    <CFCONTENT TYPE="*/*"
    VARIABLE="#ToBinary(ToBase64(docBINARY))#">
    ToBinary nor ToBase64 work on their own (I get an error about
    ByteArrays), but they seem to work together. However, now I get a
    12 page PDF with 1 blank page and all the other pages generate
    errors in the Adobe Reader. I have confirmed that the document
    comes up fine in the Java applications that do basically the same
    thing, but it is like ColdFusion does not understand the data type.
    Unfortunately, our DEV and UAT systems are not exposed for me
    to give you access. The Web Service I am consuming will never be
    available externally, which is why I am building a CF passthrough
    to display the documents to public users. The internal system will
    output private contracts, so there are privacy issues related to
    opening it up. Our prod deployment is very strict, so I cannot even
    put up public pages for testing until all involved sign off on
    functionality.
    Obviously, the CFDUMP exceeds the text limit, so I cannot
    post it either. :(
    Edit: Also, I found out that the first byte of object is a
    status code. I have parsed that off (why you now see docBINARY),
    but I only see this as a square and have not been able to convert
    this to the number code I should be getting.

  • Problem in executing query in browser and bex analyzer

    i am not able to execute query in browser nor bex analyzer...
    problem is that i dont have option to run in bex analyzer in query designer (menu bar seems missing in query designer and how can i get enabled
    and when execute the query in browser using bex query designer ..it prompts me with following error
    URL http://saperpdev.saperpdev.com:8002/sap/bw/BEx call was terminated because the corresponding service is not available
    Note
    ■The termination occurred in system ERD with error code 403 and for the reason Forbidden.
    ■The selected virtual host was 0
    ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:SAPERPDEV_ERD_02-v:0-s:403-r:Forbidden
    and i tried to open the query from bex analyzer  level
    it prompts me as follows
    macros are disabled because the security level is set to high and digitally signedtrusted certificate is not attached to the macros,to run the macros change the security level to lower settings
    pls suggest me

    hi suman,
    thanks for your response.. but let me be more clear
    i am using sap gui 7.20 front end and when i execute rrmx i am able to navigate to BEx analyzer but when i tried to open a report which i create i get following error message..
    you do not have sufficient authorization for infoprovider zic_proj
    function module  /SDF/AL_MAP_TRANSID_LOGH doesnt exit
    second thing is that i tried from bex query designer to execute the report ..but i am not able to execute the report...
    i hope some connections seems missing..please let me know what to do ASAP..
    and where can i post this question to get fast reply

  • Client Having Problems With Acrobat 11.0.3 and files created in earlier versions

    We are noticing problems with our PDF's depending on the version of Adobe they are viewed with.
    If the PDF File was created pre 11.0.3 and you view it with 11.0.3 you only see squares in the narratives from SQL/Oracle Text Fields .
    If the PDF File was created with 11.0.3 and you view it with 11.0.3, it is fine.
    Update.  As with most Software/Support services the correct information is not always received and must be forced out of the Customers. 
    The PDF files are drawing of Auto Accidents created in Adobe Acrobat and stored on a Microsoft Server Network.  The files are then merged inside a Microsoft Visual FoxPro 9.0 SP2 Application with Data received from Microfoft SQL Server 2005 Database  through a ODBC driver to a FoxPro Cursor and then created with a Visual FoxPro Report Form. The VFP Report form page that displaies/prints the PDF file is a OLE File Object and is created / Printed through Amyuni 4.5xx Converter to a PDF file and then viewed with Adobe Acrobat 11.0.3.

    There are software packages that will do those checks. So in that sense there is a way to check. However, that would be a programming task and not necessarily simple. So I really can't help you on the programming aspect (I would refer you to something like the SDK forum for programming).
    To check the file, you would normally open the document properties (ctrl-D). The general tab provides the version number and the fonts tab will tell you what fonts are used and embedded.

  • Error 404 on all Bridge functions except Browser and Files

    I have reloaded, unloaded, wiped both phone and PlayBook and cannot seem to get this fixed.
    When I click on Mail, Calendar, Contacts, I get the following error:
    "Error 404
    We cannot open the web page you have requested because it could not be found."
    Then there is a button to  Try Again.
    PlayBook 32GB OS 1.0.1.1710
    Bold 9000 OS v5.0.0.1067 (Bundle 1728, Platform 5.2.0.89)
    AT&T Service

    i had the same error but later found out that the error only comes up when wifi is on. Turn off wifi and try to access your bridge apps again.
    Jerome
    If a post was helpful, please click the kudos star button below it.
    If a post solved the problem you raised in your thread, click on 'Accept as Solution'.

  • ORDERS96 to XML by Conversion Agent - Problem with XML output (corrupt)

    Hi,
    I try to convert an EDIFACT Orders 96A file to EDI-XML to use it in SAP PI. I worked like described in BLOG
    SAP XI supports EDIFACT
    When I test the scenario conversion in conversion agent it is successful - without any errors.
    But im not able to open the output XML with my browser everytime there's the error "The XML page cannot be displayed" When I use WMHelp XMLPad it shows me not well formed (invalid token) but i can't see anything wrong so has someone an idea to solve this ?
    Thanks
    be sure points will awarded

    Hi,
      Please check the following links to resolve u r problem.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=316076&SiteID=1
    http://linuxproblem.org/art_22.html
    http://bugs.php.net/bug.php?id=34168
    warm regards
    mahesh.

  • Problem outputting AVI video

    I've had no problems outputting clips from FCP5 as AVI files before but suddenly when I try to export using QuickTime conversion to AVI my clips are only outputting as audio files – the video is missing! everything is rendered; what am I doing wrong? thanks. Ric

    And is this now the case with every AVI you export or is it specific to particular source footage?
    What happens if you create a new clean user account and test the Export Quicktime Conversion to AVI using that account?
    You might want to take a moment to do some basic system maintenance too, just in case.

  • Slow performance in browser and OS -- EtreCheck Included

    Hello all, I'll keep this as short and detailed as possible.
    I bought a Macbook Pro for my wife two years ago, but the machine has been very slow since I got it for her.  I've always been a Windows guy myself and am very familiar with troubleshooting in a Windows environment.  I have almost no experience with OSX, however, and have no idea which applications would be needed for troubleshooting, etc.
    As my wife describes the issue, the OS itself is very slow.  She opens the laptop and a full twelve minutes pass before the system is fully responsive.  She has to keep pressing the power button for anything to work.  The screen will be greyed out and a loading bar will appear at the bottom.  It takes so long to load that the system falls asleep and she has to restart multiple times.
    I have noted that the browser is also slow.  My wife uses Safari almost all the time.  I installed Chrome to see how a fresh browser install would perform in OSX, and the speed was very slow as well.  An internet speed test at speedtest.net results in:
    Ping - 47ms
    Down Speed - 5.96 Mbps
    Up Speed - .89 Mbps
    Included below is the result from an Etrecheck run
    Problem description:
    Slow performance in browser and OS
    EtreCheck version: 2.1.6 (109)
    Report generated January 15, 2015 11:03:43 AM EST
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Technical Specifications)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      8 GB RAM
      BANK 0/DIMM0
      4 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1333 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
      Battery Health: Normal - Cycle count 164
    Video Information: ℹ️
      Intel HD Graphics 4000 - VRAM: 512 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.8.5 (12F45) - Time since boot: 287 days 4:10:20
    Disk Information: ℹ️
      APPLE HDD TOSHIBA MK5065GSXF disk0 : (500.11 GB)
      disk0s1 (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) / : 499.25 GB (453.54 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      MATSHITADVD-R   UJ-8A8 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Computer, Inc. IR Receiver
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Anywhere
    Kernel Extensions: ℹ️
      /Applications/VMware Horizon View Client.app
      [not loaded] com.vmware.kext.vmioplug.10.7.0 (10.7.0) [Support]
    Problem System Launch Agents: ℹ️
      [failed] com.apple.coreservices.appleid.authentication.plist [Details]
      [failed] com.apple.lookupd.plist
      [failed] com.apple.printtool.agent.plist [Details]
    Problem System Launch Daemons: ℹ️
      [failed] com.apple.coresymbolicationd.plist [Details]
      [failed] com.apple.wdhelper.plist
    Launch Agents: ℹ️
      [loaded] com.cisco.anyconnect.gui.plist [Support]
      [running] com.gopro.stereomodestatus.plist [Support]
      [loaded] com.oracle.java.Java-Updater.plist [Support]
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist [Support]
      [running] com.cisco.anyconnect.vpnagentd.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
      [loaded] com.oracle.java.Helper-Tool.plist [Support]
      [running] com.oracle.java.JavaUpdateHelper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.google.keystone.agent.plist [Support]
    User Login Items: ℹ️
      Steam UNKNOWN  (missing value)
      iTunesHelper Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
    Internet Plug-ins: ℹ️
      FlashPlayer-10.6: Version: 16.0.0.257 - SDK 10.6 [Support]
      QuickTime Plugin: Version: 7.7.1
      Flash Player: Version: 16.0.0.257 - SDK 10.6 [Support]
      SharePointBrowserPlugin: Version: 14.0.0 [Support]
      Unity Web Player: Version: UnityPlayer version 4.2.1f4 - SDK 10.6 [Support]
      Silverlight: Version: 5.1.10411.0 - SDK 10.6 [Support]
      JavaAppletPlugin: Version: Java 7 Update 71 Check version
    User internet Plug-ins: ℹ️
      WebEx64: Version: 1.0 - SDK 10.6 [Support]
      Google Earth Web Plug-in: Version: 7.1 [Support]
    3rd Party Preference Panes: ℹ️
      Cineform  [Support]
      Flash Player  [Support]
      Java  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          9% Finder
          3% WindowServer
          2% hidd
          2% WebProcess
          1% Safari
    Top Processes by Memory: ℹ️
      983 MB WebProcess
      163 MB Safari
      77 MB PluginProcess
      52 MB mds
      43 MB SystemUIServer
    Virtual Memory Information: ℹ️
      4.60 GB Free RAM
      1.71 GB Active RAM
      744 MB Inactive RAM
      1.53 GB Wired RAM
      17.96 GB Page-ins
      3.22 GB Page-outs
    Thank you very much for any assistance

    If the machine has always taken 12 minutes to start up, since it came out of the box, then it was and is defective. There's nothing to do in that case but to take it in for service.

  • Output XML file problem (in FILE to RFC scenario)

    hi,
       my problem is that in the export parameter i have 3 variables but my output xml file shows only 2 parameters . I have checked my mapping all 3 parameters are mapped properly in output mapping .
    Initially when i started the scenario there were only 2 parameters in my export list .
    i completed this suuccesfully and then as per new requirement one more parameter was needed to be added i added a new parameter and reimported my rfc .
    the response tab of the reimported RFC shows me the newly added parameter but my final xml file only shows me the previous 2 it doesnt show me the newly added one is there any seeting which i need to change like in idoc where we have to readd the idoc in IDX2
    With regards
    Bhawarlal Choudhary

    Hi,
    2 Introduction
    Configuring IDoc adapter in Exchange Infrastructure 3.0 requires some configuration on the SAP
    systems, for both XI and the backend system where the IDoc message is to be sent. These steps, although
    simple, are many times missed or mis-configured, causing the delivery of messages to fail.
    Since IDoc adapter uses the ABAP stack, instead of J2EE, the configuration requirements are mainly in
    ABAP.
    Setting up IDoc adapters requires the XI integration server to be able to communicate with the backend
    SAP system, and also to make sure that the Logical System Name used when posting IDoc exists on the
    backend SAP system.
    3 The Step By Step Solution
    The basic steps for the IDoc configuration are outline below:
    1. Configure SM59 on XI to communicate to SAP backend system.
    2. Configure port on XI for IDoc communication.
    3. Create or verify the Logical System Name on the SAP backend system.
    4. Create or verify business system in XI’s System Landscape Directory.
    5. Verify the Logical System Name of the business system.
    6. Verify or add the Logical System Name for the sender business system.
    7. Create/configure the Communication Channel for the IDoc receiver adapter
    3.1 Configure SM59 on XI to communicate to SAP backend system.
    1. Using transaction SM59, create an RFC destination with Connection Type = “3”.
    In this example, the RFC destination name is “NDVCLNT510”.
    2. Enter the logon information:
    3. Test the connection by clicking on “Testing connection” and “Remote logon”.
    Both must be successful.
    3.2 Configure port on XI for IDoc communication.
    4. Go to transaction IDX1 on XI, and create a port. In this example, the Port name is “SAPNDV”.
    •     &#61472;The Port name must be in the form of “SAPxxx”, where xxx is the system ID of the backend SAP
    system.
    •     The Client must be the client number of the backend SAP system.
    •     Select the RFC Destination which was created in the previous step.
    3.3 Create or verify the Logical System Name on the SAP backend system.
    5. Enter transaction SALE on the SAP backend system.
    6. Create or verify the Logical System Name. In our example, NDVCLNT510 is verified.
    3.4 Create or verify business system in XI’s System Landscape Directory.
    The business system name for the SAP backend system must contain a valid Logical System Name. This Logical System Name is the one verified or created in the previous step.
    7. In the System Landscape Directory,  select the SAP backend business system. If one does not exist, then create the business system. Verify the Logical  System Name.
    3.5 Verify the Logical System Name of the business system.
    8. In the Integration Directory, doubleclick on the business system (in our example, it is NDVCLNT510).
    Navigate the menu:
    Service • Adapter Specific Identifiers.
    If information is empty or incorrect, then it will have to be synchronized with the content of the System Landscape Directory. Follow the steps below for synchronization.
    9. (Optional) Synchronization of the business system in Integration Directory to the business system in System
    Landscape Directory.
    •     &#61472;Double-click on the business system in the Integration Directory.
    •     &#61472;Switch to Edit mode.
    •     &#61472;Select menu: Service • Adapter-Specific Identifiers 
    10. (Optional) Within the dialog box, click on the button as indicated below to resynchronize.
    11. (Optional) If the expected data from the System Landscape Directory is not updated, then the SLD cache may need to be cleared first.
    3.7 Create/configure the Communication Channel for the IDoc receiver adapter.
    15. In the Integration Directory, create an IDoc receiver communication channel.
    •     &#61472;The RFC Destination is from step 3.1.
    •     &#61472;The Port is from step 3.2.
    NOTE:
    There is no need to create an IDoc sender Communication Channel for XI. Instead, the backend SAP system must be configure to send the IDoc to XI.
    4 Appendix
    Transaction: IDX2
    There are a couple of situation where IDX2 can be useful on the XI system.
    1. When we want to test connection between the XI and SAP backend system.
    2. When an IDoc has changed, and the meta data stored in XI needs to be update. When an IDoc is sent from the SAP backend system to XI, XI will first check to see if the meta data for the IDoc is already in its persistent cache. If not, then XI will use the configuration in IDX1 to retrieve the IDoc meta data from the backend system. If the
    meta is already in cache, then it will NOT do so. Therefore, when an IDoc has changed, it is necessary to manually update the new meta data on XI, or delete it from the cache, so that the latest version can be retrieved. IDX2 is used for this purpose.
    Go to transaction IDX2 and click on “Create”.
    Enter the IDoc Type and the Source Port as defined in step #2. Click “Continue”.If successful, the following will show up. If error occurs, then the IDX1 configurations will need to be re-checked.
    Regards
    Hemant
    If find helpful plz award points

  • 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

  • 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^

  • 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^

  • Open XML file with user default browser and not the default editor.

    Hi,
    I'm writing a java program that appends numerous XML files together. The result is a NEW well formed XML document. Since i have an XSLT that performs several UI modifications on this xml file, the file extension must remain '.xml'. I need to open this xml file with the users default web browser. The problem is that:
    Runtime.getRuntime().exec(cmd);
    ....opens the xml file with the users default program for opening xml files which in my case is Oxygen. I want to force java to open this xml file with the users default web browser and nothing else.
    I guess i need the Windows command to perform the 'open with' feature but i have no idea what that command is or how to find it.
    Any ideas?
    Thanks,
    Varun Singh
    Edited by: Jagara00 on Jul 2, 2009 3:49 PM

    sabre150 wrote:
    Jagara00 wrote:
    Your right, but my question relates to the java issue and not the XSLT aspect of the problem. I am looking for a java solution for reasons i will no go into here. You have lost me.Me too.
    People do not often ask questions (or make challenges or observations) idly for the sake of 'theory'. It is most useful to explain to the best of your ability.
    As to
    "Since the Desktop class was only released with SE 6 I am forced to find another alternative. "
    There is an 'alternative'. You can import it into a 1.5 project. It was available as a free standing API before 1.6 - through JDIC. See [https://jdic.dev.java.net/documentation/Examples.html|https://jdic.dev.java.net/documentation/Examples.html] for more info.
    Edit 1:
    To a later reply
    "Do u .."
    ..want to spell incorrectly when you get frustrated?
    "..do not wish to.."
    ..get any help? That is the way you are heading.
    Edited by: AndrewThompson64 on Jul 3, 2009 9:27 AM

Maybe you are looking for

  • Strange serial number -- does it matter??

    I've just bought a second-hand 20" iMac (early 2006) that has been refurbished by a local Apple dealer -- it seems to run fine but I noticed that the Serial Number as shown in both System Profiler and "About This Mac" is weird: it is "SystemSeumb". H

  • Internationalization in ADFJClient

    Hi All, I am in a process to develop an application using ADF. I want to know wether ADF provide me the facility to develop the application in multilingual or not. If yes, what are the options available with me apart from ADF UIX and JSP. If no, with

  • How do I stop Photoshop from loading photos on a MAC?

    I have a MAC.  I started loading photos on a file over 18 hours ago and it still is going.  I want to stop it, but cannot figure out how to do that.  Any suggestions?  Thanks

  • How to create the deployment descriptor with the sun application server

    I have packaged my .war and ejb-jar files. I go to autodeploy and it says i need a deployment descriptor?

  • Measuring the Performance of NIO Selectors ?

    Hi, I am trying to build a java messaging API using the java.nio package. This is similar to MPI, (which is in C/Fortran), so obviously, i need to make a comparison of this in terms of performance (how fast my library can transfer your messages). Any