Cannot Print ampersand in xml

HI all.i apply the following line of code to add a white space to my xsl file. but it comes out in the xsl file as  
here is my line of code:
Text text3 = doc.createTextNode(",�");
if2.appendChild(text3);here is my transformer
TransformerFactory transformerFactory = TransformerFactory.newInstance();
     Transformer transformer = transformerFactory.newTransformer();
     transformer.setOutputProperty(OutputKeys.INDENT, "yes");
     transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
     //transform the DOM tree to output XML file.
     DOMSource doms = new DOMSource(doc);
     FileOutputStream fos = new FileOutputStream("myxslfile.xsl");
     StreamResult sr = new StreamResult(fos);
     transformer.transform(doms, sr);
               Please help! i need the proper whit space character in the xsl file.

You don't put escaped characters into your Java strings, as the XML serializer will re-escape them. As you have seen.
The character you want to put into your Java code is the one whose Unicode value is 160. You can do that in several ways, such as:(char)160
'\u00a0'Or you could just use a single blank instead of trying to do  . They have the same result in most cases. I haven't used   in my generated HTML for a long time now.

Similar Messages

  • Cannot print a PDF file after upgrading to Windows 8.1

    Cannot print a PDF file after upgrading to Windows 8.1
    I can print anything else from either the Desktop or Start but not a PDF.  No error message but just does not print.
    Update: down loaded Adobe Reader which runs on the desktop so when I read a PDF file it now runs on the desktop and I can print it.

    Cannot print a PDF file after upgrading to Windows 8.1
    I can print anything else from either the Desktop or Start but not a PDF.  No error message but just does not print.
    Update: down loaded Adobe Reader which runs on the desktop so when I read a PDF file it now runs on the desktop and I can print it.

  • Cannot print to HP M1212nf from iPad 2 iOS 5.0.1 (9A405)

    I have an HP LaserJet M1212nf MFP printer which I cannot print to. 
    Previously, I have a couple of iPod Touch 4G's that were on iOS 4.2.x and was able to print to it successfully.
    Now, for whatever reason, I cannot print to it from my iPod Touch 4G's nor from my new iPad 2.  I just bought the iPad 2 within the last two weeks.  The iPod Touch 4G's and iPad 2 are all on iOS 5.0.1 (9A405).
    If I try to print from Safari, I get a "No AirPrint Printers Found" message from both the iPods and iPad.
    I have tried to update the HP LaserJet M1212nf with the latest firmware from the HP support site to no avail.  See below link:
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?cc=us&dlc=en&lang=en&lc=en&p roduct=3965849
    What puzzles me is that this all used to work with iOS 4.2.x flawlessly with the iPods.  Now mysteriously, it no longer works in iOS 5.0.1 with the iPods. It also does not work with the new iPad. 
    I wonder if there's anything that I need to configure to get this working again.  I realize that it should be all just "plug-n-play" and AirPrint should all work automatically.  Even before the upgrade to the latest HP firmware, the iPods stopped printing to it after they were upgraded to iOS 5.0.1. 
    Any suggestions would be much appreciated.
    Thanks,

    Have you tried "FingerPrint" by "Collobos Software" at http://www.collobos.com
    You can download the software free for evaluation, only costs $10.00 to purchase if it works for you.

  • Successfully downloaded and installed Adobe Reader on my PC ... ( Windows 7 home premium (64 bit) OS).  Cannot print adobe documents... Error message indicates need to install plug-in for adobe reader for windows 7 home premium (64 bit) OS               

    Cannot print adobe documents ... Error message indicates a need to install plug-in for adobe reader.
    Please advise how/where to locate the required adobe reader plug-in...
    Thank you,
    Joe Curcio

    What is the full and exact message you are getting?
    If the PDF contains Rich Media, the Flash Player plugin may be required: http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe

  • Cannot print from hp DeskJet F4580

    I have just bought my first MacBook with Mac OS X 10.6.4. Great computer.
    However I cannot print from the wireless hp printer. I downloaded the latest driver from hp (maybe a fault) and started to install. Everything went as expected untill the setup process of the Printer Queue. Here I add the printer in order to create the Printer Queue, but when I click on the continue buttom I get this warning: Are you sure you want to continue without adding a Print Queue? I finished the installation with a congratulation sign.
    Therefore there is no doubt, that the printer queue is missing. However I cannot found out to install the printer queue.
    The printer is a socalled all-in-one printer. The scanner function is perfect with the wireless connection. But not the printer function.
    I have also tried to connect via usb cabel. The result is the same. Scanner okay. Printer not okay.
    The printer works perfect under Windows.
    I hope somebody can help me. Thanks in advance.
    Erik

    I'm having the same problem ! The wireless printing works using OS 10.5 on a G4 PowerBook but not OS 10.6 on an intel MacBook. I'm going to get in touch with HP as have used the latest drivers (as you have) - I've re-installed the HP software using Software Update for the latest version - still can't print. USB printing is also faulty so must be their drivers.
    I'll let you know if I have any luck !
    Simon

  • I cannot print from Websites or my college online course. Tries to save files to desktop as an .xps document but nothing happens and I get an error message that print command did not work. Have reinstalled firefox and adobe, no help. Any suggestions?

    Cannot print anything from internet using Firefox as browser. Please advise. I have to use Firefox for internet college courses, cannot print my assignments. I do not have this problem on Mac or using Internet Explorer. Only happens when using Firefox. When I select print a message comes up to save information to desktop as .xps file. Select save, sometimes it is on the desktop but I cannot open the file or it simply does not save file and get an error message that print command failed. What is happening?

    {Ctrl + P} and select your printer in the Printer - Name box near the top of that window.
    http://kb.mozillazine.org/Problems_printing_web_pages

  • I cannot print a PDF from Adobe Acrobat Pro or Adobe Reader with Mavericks!

    I cannot print a PDF from Adobe Acrobat Pro or Adobe Reader.  I tried on both MacBook Pros we have here, both now with Mavericks.  Error message says "Opening printer connection failed.  Unable to open printer connection . . . "  This is after it says sending data, printing, shows the percentages etc., but then at the end I get the error message above.  I can print a PDF (same one) from Preview, but not from Acrobat!  What's going on?  Never had this issue before Mavericks . . . Please help.

    This is an open forum, not Adobe support... you need Adobe support to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Cannot Print PDF File from IE8 Beta 2

    I recently installed Adobe Reader 9 and Internet Explorer 8 Beta 2 under Vista 32-bit. When a PDF file appears under IE8, I cannot print the file. The print command shows only a blank page. If I save the PDF file, open Adobe Reader 9 and open this PDF file, I can print the file correctly. Please advise if you have the same issue and possible fixes?
    Thank you...

    I have a similar problem. I have Adobe Reader 9 and IE8 Beta 2 on Vista Ultimate, and other pdf drivers as well. When I try to print to any pdf driver in IE8 B2 I get "Access Denied" message box, then when I click OK I guest a script error on line 2037, Char 1, unspecified error, code 0, URL: res//ieframe.dll/preview.js. It occurs with all the pdf print drivers I have including ScanSoft PDFCreate, Quicken PDF printer, and DocuCom PDF printer. If I do print preview and then print, there is no response.
    Debugging java scripts is more than I want to get into. Any ideas?

  • CANNOT PRINT FROM ADOBE 8.1.2 PDF FILE TO OLIVETTI ANYWAY

    Hi I have had this problem before wiht a laserjet printer and cannot remember how I have solved it.
    I am on a Macbook pro running leopard OS 10.5.2 and trying to print a standard pdf from Adobe Acrobat Professional Reader 8.1.2 to an olivetti anyway. I have no other probs printing,and can print this same pdf through preview, but the fonts default.
    It goes through as if it is printing then in the printer set up it just stops itself and won't print.
    Any ideas?
    Cheers

    I did download new drivers, but the situation gets even more interesting. It is only one file I can't print. I print .pdf files from a particular website quite often. When I started having problems with this one file - I just got stuck there. Well, I went to some of the other "new" pdf files and was able to print those. I still cannot print one particular page. I have tried downloading the file to my hard drive but still could not print. I have decided there is some code in this particular file that my printer cannot compute. I did manage to get it printed in B/W on an HP laser printer. Just is a weird glitch. Thanks for responding.

  • Cannot Print in Acrobat Pro 9.4.2 (XP Pro SP3), but Other Apps Can

    I am unable to print PDFs on my workstation unless I drag them from a Windows Explorer session and drop them on an open printer window (Start, Printers and Faxes, double-click on printer to open window). I have Acrobat 9 Professional (ver. 9.4.2) running under Windows XP Pro (SP3). I cannot print a PDF from within Acrobat or from within a browser window. I have done a "repair install" on Acrobat and rebooted. When I try to print from within Acrobat or a browser window, I do not receive any form of error message. There is no indication of any problem. If I have the printer window open window (Start, Printers and Faxes, double-click on printer to open window) and I try to print from Acrobat or a browser, I never see anything appear in the window, even briefly. If I drag a PDF from Windows Explorer and drop it in the printer window, the document name appears briefly in the window and the document prints.
    I have double checked my printer settings from within Acrobat to make sure that it is not "printing to file." The correct printer *is* selected.
    I've tried printing to different printers in the office. I've even tried printing to the "virtual printer" which is a front-end to our fax server. No dice. If I monitor the printers folder (which lists every printer that my workstation can print to currently), the "documents" column (which shows the number of documents in the queue to be printed) never changes from zero.
    The fact that I can drag a PDF from Windows Explorer and drop it on a printer and get it to print really puzzles me, since I thought that this was only possible if either Acrobat Pro (or other paid version) or Acrobat Reader was installed. That is, I thought that Windows XP cannot print a PDF unless some sort of PDF reader (Acrobat, Nitro, etc.) is installed. Then again, I may be mistaken. *IF* indeed Windows XP doesn't know how to print a PDF without help from a PDF reader of some sort (Acrobat Reader, Nitro, etc.), then how is it that I can drag, drop and print, but I can't print from within Acrobat Pro itself? Meanwhile, all other apps print just fine to any given printer.
    FYI... this question has languished for two weeks with no solution at experts-exchange.com. I've never stumped them before. I've never waited more than 24 hours for an answer there before, and usually a solution takes just an hour or two. This suggests to me that my situation is quite rare. Can anyone get me on track?

    SOLVED:
    See http://kb2.adobe.com/cps/891/cpsid_89178.html

  • Firefox 37.0.1 crashes every time I try to print. Thunderbird cannot print either. IE and other apps have no problem printing.

    Firefox 37.0.1 on Windows 7 64 bit. To try to fix, I have inactivated all addons, then removed all addons, then back leveled Firefox, then uninstalled Thunderbird (as this was an addition around the time this started happening), and deleted and reinstalled the printer driver. Even when I uninstalled Thunderbird and then installed Firefox 37.0.1 I cannot print. With both programs reinstalled now I again cannot print from either. I get "error encountered while printing" with Thunderbird, and a crash with Firefox. I followed all of the advice in the "Fix printing problems in Firefox" article in the knowledge base to no avail. The latest Firefox crash report is bp-1132bb48-c14b-4f20-ab65-8d58e2150415. Looking below, I see that there are installed plugins, but I don't understand how those got there as I completely uninstalled, downloaded, and reinstalled Firefox. I can't find the same issue in the knowledge base and can't fix following printer problem suggestions. Sure would appreciate some help.
    I also reset all print related config entries per advice in another support thread. Many of those were MP560 related and had that model name built into the config entry name (my printer is a Canon MP560). I notice now that those entries are missing. I also have no PRINT_PRINTER entry referenced as a config option to reset. It is missing.
    Resetting the PRINT.PRINT_PRINTER entry on Thunderbird also did not work and the entry disappeared upon reset. I believe this is what happened with Firefox, too.
    I forgot to say that I can print fine from all other programs and browsers.

    I didn't see that I could edit the question before "I answered myself." I updated the question.

  • Printing on Pre-printed stationary from XML Publisher

    Hi,
    I have a requirement where a report is to be printed on pre-printed stationary from XML Publisher. The stationary would be NCR paper and has to be printed from a dot matrix printer.
    My first question is whether report generated from XMLP can be printed thro'
    dot matrix printer, coz as far as i know it takes only character format .If yes, do we need any special handling?
    If anybody has any experience related to this problem, please let me know the approach.
    Can mail me at [email protected]
    Regards,
    Satrajit

    Hi Milind
    I see what you've got.
    It is not uncommon to use character mode output for pre-printed stationery.
    This would appear as draft output from a Dot Matrix printer. I hope you understand what I mean here. It is somthing like printing using fixed width font.
    Design and run the report with MODE=CHARACTER from the command line.
    You need to figure out and design the layout in such a way that you are printing in the empty spaces provided in the pre-printed stationery. This is usually by trial and error method. You may probably blow several pre-printed stationery sheets before you get it right.
    Regards
    Sripathy

  • After upgrading to Mountain Lion 10.8.2, I cannot print to my Samsung laser printer ML 2525w?  How can I get this set up to print?

    After upgrading to Mountain Lion 10.8.2 on my iMac, I cannot print to my Samsung B&W Laser printer ML 2525W either by USB or wireless.    Any help on how to setup or reconfigure would be apprecaited.
    I either print blank pages or prints one time then goes off line, or spits out a bunch of blank paper, etc.  Have gone through all the standard fixes, reboot, reset , reload driver, etc.

    From the link to the Thread you provided, I worked through the one message procedures that were listed.
    For ease of reference, I have copied them and printed them below.  This was an old thread but the guidance still works with no firmware upgrade required.
    I would stress that you MUST delete any and all files relating to USB connection of the printer to the MAC, including all print drivers (from both Apple and Samsung either from CD or web downloads) and all print queues, etc.  I was only able to get the printer to properly hand shake with my Mac by setting it up wirelessly after all old files were deleted with hard power off reboots on both the Mac and Printer. 
    I hope that someone from Apple will pass this note along to their programing department because there is some type of incompatibility in the new ML OS and the Samsung ML2525w print dirvers used for a cable (USB) type connection.  Apple needs to be talking to Samsung to get the USB issue resolved.  I am going to post this same message on the Samsung site to see if someone from there will contact Apple to work together on a final solution for USB connectivity.
    Here is the steps I followed to get my ML2525w to work in the wireless mode.  Again, I cannot stress the need to clean out all the old files (drivers, print queues, etc. - everything) before setting up wirelessly. 
    As a note, I ran this printer with Lion for almost 2 years and it always worked fine (both wireless and USB).  From other comments on the thread, users were good with this printer using Lep. and Snow Lep also. - - no issues from either a USB connection or wireless until Mountain Lion.
    Before the fix, I was experiencing many of the same issues as described on user chat threads, printer going offline after a print job.  1st page sometimes printing but all the rest of the pages were garbage.  No printing at all. Printer just running a bunch of blank pages out. etc.
    I run an iMAC 27" desktop with the ML OS upgrade just installed from Lion.
    "I've just installed one of these printers for my parents.
    First of all, don't waste your time connecting the ML-2525W as a USB printer. The printer will go offline after each print job. It's hopeless, at least (I assume) until Samsung gets around to publicly releasing a firmware update.
    Instead, you have to use the ML-2525W as a wireless printer. In that mode, it works fine.
    This is what I did:
    (1) First, if you have already attempted to install the Samsung driver software from the included CD-ROM, uninstall it. Get the uninstaller from the Samsung support site:
    http://www.samsung.com/us/support/downloads/ML-2525W
    Download the "Printer Driver (ver. 4.0)" ZIP file. It unzips to a folder that contains the uninstaller. Likewise, download the "Smart Panel Driver" ZIP file and uninstall the Smart Panel software.
    (2) Disconnect the USB cable from the printer, if it is connected. Pull the power plug on the printer and power cycle it.
    (3) Restart your Mac.
    (4) Go to the "Printer Driver (ver. 4.0)" folder that you previously unzipped. Inside it is a folder named "WirelessSetting". Open the folder and run the "Wireless Setting.app".
    (5) The application will ask you to connect the USB cable to the printer. Do so, and the Mac should be able to communicate with the printer to perform the wireless setup.
    (6) The application will show you a list of wireless networks. One of them is the wireless interface in the printer (ad-hoc). You can ignore that unless you intend to use the printer without connecting to another wireless network. In my case, I selected the wireless network in my parents' home (infrastructure) and entered the security passphrase. The application then configured the wireless interface in the ML-2525W to connect to the home network.
    (7) The Wireless Setting application will then tell you to disconnect the USB cable.
    (8) After finishing the Wireless Setting application, go to Word, Textedit, Pages, or Safari, and select a file or page to print. In the print dialog window, you should see the ML-2525W as a "Nearby Printer" (i.e. via Bonjour). Select the ML-2525W, and your Mac will automatically connect to Apple's Software Update and download the latest Samsung driver. If for any reason the Software Update download does not succeed, you can manually download and install the Apple driver using the previously published link in this discussion.
    (9) After that, you should be able to print to the ML-2525W whenever you want, without the printer going offline.
    (10) If you have a USB printer queue still in your Print & Fax Preferences (from your previous unsuccessful attempt to connect via USB), you can delete it. You only need to keep the Bonjour queue.
    Obviously YMMV, but in my case this procedure got the printer working reliably without the need for a firmware update."
    MacBook (white 12"), Mac OS X (10.6.5)

  • Cannot print from ANY application after upgrade to 10.4.8 !!!

    Hi all,
    as it is written in the subject.
    Up to yesterday, I had OS 10.3.9, everything ok, could print from any application.
    Then I moved to Tiger and to the last version (10.4.8).
    And today the "nice" surprise: either from Preview, Texshop, Word, any web browser... I cannot print anymore!! As soon as I go to file/print, the application crashes, any suggestions??
    Thanks a lot

    Hmmm. It sounds like a possible problem with the system prior to updating. If you've done this already don't be upset by the suggestion. I'm just trying to cover the bases.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. Then select Disk Utility from the Installer menu (Utilities menu for Tiger.) After DU loads select your OS X volume from the list on the left, click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now shutdown the computer for a couple of minutes and then restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior (3.0.3 for Tiger) and/or TechTool Pro (4.5.1 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X. Note that Disk Warrior will not work on Intel Macs.
    Download the standalone 10.4.8 Combo Updater (be sure to get the correct version - Intel or PPC - for your Macs. Reinstall the update using the Combo Updater.
    As an added precaution I would recommend you first boot into safe mode before doing the above.
    There is a shareware utility called Printer Setup Repair (www.macupdate.com) that you can also try. It is sometimes very useful for fixing problems with the printing system.

  • Office 2010 - "Word cannot print, there is no printer installed"

    Hi All,
    Been having a problem recently on many PC's at a site where they run Windows 7 x64 with Office 2010 x86.
    Printing usually happens with no issue, however sometimes when they click the print icon, (in the 'file-->print' section) it will display 'word cannot print, there is no printer installed'.
    The client tells me they can go to control panel and print a test page successfully, but word/excel will not print. In order to resolve the issue they close the program, reopen it and printing works straight away. Today I asked them to restart the print
    spooler, instead of closing/reopening word, this did not resolve the issue. closing and reopening did fix the issue.
    So far they have experienced the issue with Word and Excel only, however they don't use the other programs a great deal.
    The printers are distributed with group policy. In addition to network printers they use PDF Factory (which is like PDF Creator).
    I have been unable to reproduce the issue.
    Any thoughts would be greatly appreciated, thank you!

    Hi,
    From your description , I understand that you got message ”word cannot print, there is no printer installed” when clicked the print icon.
    If you do not have a default printer, use the Add Printer Wizard to install one.
    Follow these steps:
    Click Start and then click Devices and Printers.
    Under Printer Tasks, click Add a printer, and then follow the instructions to install your default printer driver.
    Note If your printer model is not listed in the Manufacturers and Printers lists, see the Hardware
    Compatibility List (HCL) for an updated driver. To do this, visit the following Microsoft Web site:
    http://www.microsoft.com/whdc/hcl/default.mspx
    If your printer is not on the HCL, contact the printer manufacturer for drivers and instructions.
    Sincerely,
    Harry 

Maybe you are looking for

  • Buzz In Audio When Using DVI Output

    I've had this problem for a while now, but everytime I plug in a monitor to the DVI port I get a horrible buzz out of my audio interface. I've tried everything: using different DVI cables and audio cables, using different audio interfaces, disconnect

  • Creating a block key default for documents created by MIRO?

    Hi All, Could anyone tell me how to create a block key default for documents created by MIRO?   Thanks Gandalf

  • Adding 1 JComponent to 2 different JPanels: good idea?

    Is there any general rule which says it is a bad idea to add 1 JComponent to 2 different JPanels? It would make my life a lot easier if it's no problem. In that case I only have to update one.

  • PDF FILES WONT PRINT

    Ever since Ive used my Macbook Pro with Safari, I have been unable to print PDF files.  I can view the files but as soon as I go to print, the documents are blank in the print screen (and if printed).  I am able to view and print these files if I use

  • Is there a way to download my address book from icloud?

    i just lost all my contacts while using a backup app distributed by my wireless provider. is there a way i can download just my contacts without connecting my iphone to the computer?