Printing XML

Hello ,
how do I print XML data using Java?
Example:
<segmentGroup>
<segment> a</segment>
<segment>b</segment>
</segmentGroup
PLease help
thanks

try reading docs on DOM API..
and javax.xml.parsers ..
u can either use any SAXParser or a DOM based parser to parse ur XML file ..

Similar Messages

  • Unable to print xml publisher report in excel format in R12

    Hi All,
    We are unable to print xml publisher report in excel format in R12. We were able to see the excel output but it's printing junk characters while printing and it's printing without any issue with PDF format.
    Please let me know how to fix this issue.
    Thanks,
    Raja

    Hi Raja,
    I presume you have gone through the debugging process of testing your template locally first to get the expected result.....
    If yes, this note might probably be helpful "Changing Output Format to RTF or Excel in XML Publisher Request Does Not Display Output Correctly (Doc ID 404512.1)"
    Good Luck,
    Lamine Balde

  • How to print XML report in French Language?

    Hi,
    I need to print XML report in French language, currently it display in English language.
    I have used following steps:
    1. I enabled French language on my oracle apps instance.
    2. Created the concurrent program with output type as XML
    3. Created Data Definition using XML Publisher Responsibility
    4. Created template. At the time of creation of templete, enabled Translatable check box and click Apply
    5. Once template is uploaded, you will find two buttons. Export Translation and Upload Translation.
    6. Clickd on Export Translation. XLF file opened.
    7. In XLF file - e. g. source-language="en-US" target-language="fr-FR".Source is English and fr is for French language and FR is territory.
    8. Update the target fields in French language. In the below example source field is in English language and target is in French language. This indicates that wherever the Invoice Date is present in RTF template it will be
    replaced by the target field in french language.
    <source>Invoice Date:</source>
    <target>Date de facture:</target>
    9. Updated the same for all fields and finally import the updated translation file.
    10. But When i run report , output display in English not in French.
    Please any one can help, what should in do next to print in French Language.
    Thanks,
    Sunil Mane
    Edited by: 973411 on Nov 30, 2012 6:56 AM

    Are you selecting the Template at the time of Program submission?
    Check in the Options while submitting the Program

  • Firefox 4.0 doesn't print XML files. Page print preview is blank!!!

    When I open XML file and try to print it File -> Print I get only blank page. Firefox 3.6.15 prints XML files excellent.

    Real good, you are asking for help and the source code is blocked from being viewed.
    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum. <br />
    You're probably going to have to allow access to the source code for that page for anyone to be able to help you.

  • Pretty printing xml with sql

    Hello
    I have to pretty print xml which is stored in data base column ( clob)
    My table
    create table mytab
    myxml clob);mydata
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Us name="Step">
    <my name ="st">
    <colol name="t"/>
    </my>
    </Us>any idea/suggestion?
    Edited by: user10647455 on Dec 19, 2011 2:04 PM

    Thanks !
    I tired this as well
    select XMLSerialize( document xmltype(myxml) as CLOB INDENT ) from mytab;

  • How to pretty print XML alerts

    Hi!
    I'd like to generate mail alerts in OSB which include a XML content. I need XML to be human friendly printed (that is with indentation) but XML is printed in a single line.
    Is there any way to pretty print XML content in alerts (and also in alerts emails).
    Thank you in advance.

    The example of what the OP wants it to look like I thought was quite plain. Its right at the top of the post.
    Unfortunately it is also quite difficult to accomplish using System.out.print statements.
    You have to print out the root of the tree first (its at the top)
    However you don't know how far along to the right you need to print it without traversing the child nodes already (you need to know how deep the tree is, and how far to the left the tree extends from the root)
    So you will need to traverse the tree at least twice.
    Once to work out the offsets, and again to print out the values.
    The working out of offsets would have to be a depth search traversal I think
    The printing of the values in this fashion would be a breadth first traversal.
    I remember (ages ago) doing a similar assignment, except we printed the tree sideways.
    ie the root was on the left, the leaves of the tree on the right of the screen.
    That meant you could do an inorder depth traversal of the tree to just print it once.
    hope this helps,
    evnafets

  • Printed XML Purchase Order Report - Printing blank Blanket PO page

    Hi,
    When printing the xml report of a Blanket PO Release, the release lines and headers print first but the last page is a page for the primary blanket PO (PO Num without any releases attached). This page does not contain any information in the header or line fields therefore it is a waste of paper. Looking into the XML code the blanket PO page is pulled in the same manner as the Release lines, against G_Headers. I'm going to look into the Reports Developer SQL to see if I can find something but I would rather not mess with the configuration of the SQL if I did not have to.
    Any ideas on how to get rid of this extra unnecessary page?
    Thanks,
    -Steve

    Hi,
    RDBMS : 11.2.0.1.0
    Oracle Applications : 11.5.10.2
    OS: Unix
    The issue can be reproduced.
    The report in question has had customization but the blank page prints in the Printed Purchase Order Report(Portrait) seeded function as well. From what I see the SQL might be able to modified based off of the input paramet "Print Blanket PO". When this is selected "No" the Blanket header is printed with no lines (that's where the blank PO page is coming from). When selected Yes the blanket header with all the blanket lines are printed. So I may be able to go in and change how that input parameter changes the output, unless there is a better way.
    -Steve

  • Printing XML Docs in List view created by XF builder

    Hi,
    I have an iview which displays a list of XML documents created using XMLForms. I want to add Print functionality in this iview. I tried adding a simple HTML link calling window.print() in the <project>RenderListItem.xsl file. It works fine. But the problem is that, the Print link gets displayed for each and every document.
    I just want the Print link to be displayed only once. I tried giving the Link outside the <xsl:template match="DataModel"> section. But it threw an error.
    Is there any way to display the Print link only once?
    Thanks in advance.
    Regards
    Ranjith

    Same Problem here, if you are able to solve it, please also help me.

  • Printing XML report (with report.xsl stylesheet) shows font colors, but not table highlight colors

    I am trying to print the XML report generated by TestStand to a PDF in order to archive it.  When the XML report is rendered in Internet Explorer, everything looks fine -- Sequence names are highlighted in teal, Pass is in green, Fail is highlighted in red.
    However, when I print this page to a PDF (using BullZip PDF printer, or even the XPS printer), all of the table highlighting is gone.  The UUT Result in the header is red or green font color depending on the pass/fail state, but sequence names and any formatting applied to tables within the body of the report have no highlighting.
    Is the stylesheet altering what is rendered when the XML file is printed?
    This is the output when viewed in IE 
    This is the output when viewed as a PDF printed from the same file viewed in IE.
    Thank you,
    Matt
    Solved!
    Go to Solution.

    Hey Matt,
    This is actually because of a default setting in Internet Explorer to not print background colors on webpages. To change it, simply go to the Page Setup screen (on IE9, you click the gear icon, then Print > Page Setup) and select the option to print background images and colors. After doing this, the printed report should contain the colors you see on your screen.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Parse/print xml file

    I have a folder full of existing XML files (test reports). I am programmatically searching and selecting a single file based on naming citeria with no problems.
    What I can't get working is printing this file. It views properly in a browser (I have the proper XSL in the proper folder) and prints manually from the browser. I need to programmatically send this file to the printer and print with no user intervention.
    I am currently going down the path of using ActiveX or DOM but can't seem to get it all working within LV (using v.8.5). Is there a better/easier way to print this file? If I were to use the report VIs, I would need to change this XML file into an HTML report (seems cumbersome).
    Thanks in advance for any guidance and assistance,
    Brian

    You could talk directly to the printer and send it the commands directly...Its a pain, and not very "portable" since its brand or printer specific, but I had to do it a long while back with my app...
    Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
    using LV 2010 SP 1, Windows 7

  • Print  XML-PDF report in 40 langauges

    Hi
    i am having the below requirement
    I need to print the 'statement generation program' in 40 diffrent languages
    For that i had the all the country specific lables in custem staging table ,I needs to call those conditionally and print them in pdf.
    The issue i am facing is for Germany and other countries i can't able to print the german data currectly in pdf ,
    even in the xml its not generating properly .... but if i see the xml source its looking currectly
    I am using '<?xml version="1.0" encoding="ISO-8859-1"?>'
    .Because if am using UTF8 its not yet all generating XML with german data
    Can any one help me on this .........
    Edited by: Yamini_Priya on May 4, 2010 5:25 AM

    Hi Raja,
    I presume you have gone through the debugging process of testing your template locally first to get the expected result.....
    If yes, this note might probably be helpful "Changing Output Format to RTF or Excel in XML Publisher Request Does Not Display Output Correctly (Doc ID 404512.1)"
    Good Luck,
    Lamine Balde

  • Printing xml spreadsheet file from java

    Does anyone know if it is possible to print an xml spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly appreciated.
    Thanks in advance.

    Does anyone know if it is possible to print an xml
    spreadsheet file directly from java.
    I'm quite new to java and any help would be greatly
    appreciated.
    Thanks in advance.Are you crazy, mad or stupid???
    Just messing.....
    If you're new to Java then don't bother. Otherwise try [url http://jakarta.apache.org/poi/index.html]here for jakarta's API.
    Honestly though, if you're not new to programming then fair enough. BUT, if you are new to Java and programming then acknowledge the fact you'll have to whack yourself alot before u get anywhere.
    Ted.

  • Printing XML DOM to string

    When I create an xml document and print it to a string I find that I can only get 900 characters at a time from the output string (using substring) even though its length is reported as > 900
    Running on Oracle 8.1.7

    Sun's resources on XML (including JAXP):
    http://java.sun.com/xml/
    Parser with DOM and SAX support:
    http://xml.apache.org/xerces-j/
    http://www.alphaworks.ibm.com/tech/xml4j
    Of other interest:
    http://xml.apache.org/xalan/
    http://java.apache.org/ecs/index.html
    http://xml.apache.org/cocoon/index.html
    Cameron Purdy
    http://www.tangosol.com
    "Kevin Woo" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Would anyone know where I could get a XML DOM to Java String parser,
    which does forward and backward parsing?
    Thanks a bunch,
    Kevin Woo

  • API to print xml data file on a template

    Hi All,
    I want to know if there is any API to print an XML file on a RTF template.
    I have a scenario where a program runs and generates XML file and gives the output in PDF format. Now, i want to use the XML file generated by the program to print on a different template.
    i cannot run the program twice to use subtemplates concept.
    Thanks
    Sam

    Hi,
    See:
    XML data output file in a directory needs to be published as a pdf report
    or
    http://garethroberts.blogspot.com/2007/05/fake-it-masquerade-one-bip-concurrent.html
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Printing XML with attributes

    Hi,
    I wrote some code to generate DOM trees, and some more code to print a tree as a string.
    But my the string loses attributes - i.e. all tags come out without attributes. And I am not sure why....
    public static String getStringXml(Document xmlDoc)
              //Output the XML to string
              TransformerFactory fac = TransformerFactory.newInstance();
              Transformer transformer = null;
              StringWriter writer = new StringWriter();
              try
                   transformer = fac.newTransformer();
                   transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
                   StreamResult result = new StreamResult(writer );
                   DOMSource source = new DOMSource(xmlDoc);
                   transformer.transform(source, result);
              catch (TransformerConfigurationException e)
                   e.printStackTrace();
              catch (TransformerException e)
                   e.printStackTrace();
              return writer.toString();
         }

    It is possible I am doing something wrong when adding attriubtes:
    Element myElement = xmlDoc.createElement("myElement");
    myElement.setAttribute("id", "first");

Maybe you are looking for

  • Blu-Ray workflow

    I have a 1080i project which has a 2 channel audio. I created a surround sound mix from the 2 channel audio using soundtrack pro. I want to burn a blu-ray using Encore but have the 5.1 surround as well. I am able to burn SD DVDs with 5.1 surround sou

  • New new iTunes update

    I just opened iTunes 7 and it said there was ANOTHER update! I was thrilled, so I updated. Now it still says 1.2 and my iPod still wont play my purchased stuff. Any help?

  • Javax.crypto missing in my webdynpro project

    Hello I am trying to develop application which uses DES crypto function. I have an example of code which should work but the problem is with the JCE crypto library it uses. In normal java project I can import javax.crypto but in my web dynpro DC comp

  • Acquire the non-evaluation version of SAP Memory Analyzer

    Hi. I'd like to know how to acquire a validly licensed copy of the non-evaluation version of SAP Memory Analyzer. My co-workers have been using it and seems to be useful. Thanks, Mariano.

  • Cannot Execute .java File..

    Hi,i'm really confused about this..it's so weird.. i'm trying to execute (.java) file from another directory, but it can't,why? if i just compile that file from another directory there's no problem with that... ex : i have file named Hello.java which