XML Publisher: where's XML Publisher output?

Hi,
The XML file created by report is in FND_Concurrent_Requests.outfile_name.
Where's the XML Publisher output?
I want copy the file generated (PDF or EXCEL) using utl_file.fcopy because bursting fail whe template is Type=>XSL-XML.
Do your guys have any suggestion with this case? any input is very appreciated.
thanks in advance
Robert

Welcome to the forums !
Pl see if MOS Doc 305307.1 (How To Modify Print PO Report POXPOPDF With Custom Template) can help
HTH
Srini

Similar Messages

  • When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb.But the output records is originally 4000 records. When copy to new excel it is showing 3.5 mb only. Does anyone knows the answer for this issue?

    When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
    Does any one knows the answer please advice?

    Hello,
    This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
    MHTML and XHTML are more verbose formats than binary .xls.
    It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file).  This is a known limitation of RTF layout templates.
    BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
    Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
    Bogdan

  • XML Publisher Error with reports published in XML publisher

    Hi All,
    I am geting the following error with a report published using XML Publisher
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    The system cannot locate the resource specified. Error processing resource 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.d...
    How can i Rectify this?

    Hi Ark,
    In order to generate a report using xml publisher. we need the following.
    1. XML Data
    2. Template file (RTF/PDF/..)
    XML data will not be created by the template file.
    We will be required to create XML data. One of the easiest way to create xml output is using the RDF. We can change the rdf output type in the concurrent program to XML.
    Once the xml and the template is available, "XML Report Publisher" will be able to generate the output in the required format.
    Thanks,
    K.Nataraja Suthan,

  • BI Publisher vs PeopleSoft XML Publisher & Error with Templates

    Hello All,
    I am completely new to this so please bear with me.
    1.) What is the difference between Oracle BI Publisher and PeopleSoft XML Publisher?
    2.) I am working with PeopleSoft XML publisher and I had to make a change ontop of a bundle.
    I needed to change the rtf template so I uploaded it, however, when our report defn, template defn, and file defn got migrated to out tst environment something happened and I am getting the following error: Template file not found in DB. Because of this error I can no longer access the report definition via the application. It is also telling me that there is a problem with the LoadTempDefn process in the peoplecode. This is pointing to the scroll area where the templates are uploaded.
    I need some help resolving this i.e details on what tables PeopleSoft uses in the DB to store templates? And how I can get rid of this error.
    Any help would be much appreciated.
    We are on PT 8.48
    CS 9.0
    Oracle Client 10G
    Message was edited by:
    user510014

    Hi ,
    Check the below links may be helpful to you .
    http://www.rittmanmead.com/2007/09/integrating-bi-publisher-and-discoverer/
    http://www.scribd.com/doc/527854/Discoverer-BI-Publisher
    Thanks,
    Ananth

  • Org.xml.sax.SAXParseException with XML Report Publish

    Anyone see the following error in XML Report Publisher? This happened after I ran Employee W2 XML Interface and ran XML Report Publisher for the output of the PDF output.
    --XDOException
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:570)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:235)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.xdo.oa.cp.JCP4XMLPublisher.runProgram(JCP4XMLPublisher.java:684)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Caused by: org.xml.sax.SAXParseException: <Line 268, Column 6>: XML-20109: (Fatal Error) PI with the name 'xml' can occur only in the beginning of the document.
         at oracle.xdo.parser.v2.XMLError.flushErrorHandler(XMLError.java:441)
         at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:303)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:305)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:289)
         ... 17 more
    Thanks.

    We are going to user Employee W-2 PDF.

  • Importing third party XML files into form-based publishing

    Hi,
    I want to import third party XML files into form-based publishing. My problem is that when I open the files, they are presented as normal XML files.
    The 'type' property is not set to "form-based publishing". That's the reason no form is linked to the XML file.
    Is there a way to change the value of this 'type' property? Then I can set it to "form-based publishing".
    Message was edited by: E. van der Palen

    Hi,
       You should take into account two things:
    1. XML Repository filter
    System Administration-System Configuration-KM-CM-Repository Filters-choose XML Forms Repository Filter
    edit it and add your repository.
    After that you have to restart it.
    2. Resource Type.
    You should modify cm_resourcetype property to set form-based publishing.
    You could edit this xml file using form builder and then set this parameter.
    Patricio.

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • Method DBMS_XMLQUERY.getXML() always inserts " ?xml version = '1.0'? " in output

    Method "SYS.DBMS_XMLQUERY.getXML()" seems to always want to prefix "<?xml version = '1.0'?>" to the returned output.
    I don't think this is always called for.
    I want to extract data from the database as an XML fragment. Outside of the RDBMS, I would then combine multiple fragments together into a larger XML document. If each fragment is prefixed with "<?xml version = '1.0'?>", I have to add logic to strip out this offending line.
    I tried method setXslt(). Even when my XSL stylesheet transforms the XML into HTML or TEXT, the output gets prefixed with "<?xml version = '1.0'?>", which I feel is wrong.
    Question: Is there any way to instruct DBMS_XMLQUERY to omit "<?xml version = '1.0'?>" ?
    Thanks!
    Louis

    Hi,
    Use DBMS_XMLGEN.getXMLType to retrieve the XML data into an XMLType variable.
    Then, with getClobVal method, you can convert it to CLOB :
    SQL> DECLARE
      2    v_xml XMLType;
      3    v_lob CLOB;
      4  BEGIN
      5    v_xml := dbms_xmlgen.getXMLType('select * from scott.emp where rownum = 1');
      6    v_lob := v_xml.getClobVal();
      7 
      8    dbms_output.put_line(v_lob);
      9  END;
    10  /
    <ROWSET>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7902</MGR>
      <HIREDATE>17/12/80</HIREDATE>
      <SAL>800</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed

  • TCP XML messages parsing time with realtime output.

    I am currently coding a project and I have hit a bit of a roadblock. The basic overview is I need to be able to receive around 3,000 lines of XML per second from a JavaScript sending TCP messages. I have to extract the data to two seperate files, output the data to a text pane and also further seperate that data into a table as well. All this data needs to be updated as soon as it is received. I am currently comfortable with receiving around 700 lines per second without data loss but anything over that I start losing data somewhere. As for the basic over view of my code, I have my main program which creates the GUI and starts a listening thread that listens for "clients"(JavaScripts) to connect.
    Main:
    public static void main(String[] args)
         SplashScreen screen = new SplashScreen();
         screen.showSplashWindow();
         SwingUtilities.invokeLater(new Runnable()
             public void run()
              MainMenu mainmenu = new MainMenu();
              mainmenu.setVisible(true);
              mainmenu.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        }Listener Thread:
    final Runnable listener_runner = new Runnable()
              public void run()
                  try
                   startClientListener();
                  catch (Exception e)
             final Thread listener_thread = new Thread(listener_runner,
                  "ListenerThread");
             listener_thread.start();Called from listening thread to setup client:
    public void startClientListener() throws IOException
         ServerSocket serverSocket = null;
         try
             serverSocket = new ServerSocket(XXXX);
         catch (IOException e)
             System.err.println("Could not listen on port: " + portNumber);
         while (true)
             MultiServerThread new_thread = new MultiServerThread(serverSocket
                  .accept(), outputWindow, resultsWindow, prefAttr, runningCount);
             new_thread.start();
        }In my MultiServerThreads runnable I have a BufferedReader to read the input. This reader loops through the input and adds it to a StringBuilder which then passes that data to the output files and the XML parser as seen here:
    in = new BufferedReader(new InputStreamReader(socket
                  .getInputStream()));
             while ((input_line = in.readLine()) != null)
              build.append(input_line + "\n");
              file_out.append(build);  //Text file
              xml_copy_out.append(build);  //XML file
              loadData(build);  //XML parser
              build = new StringBuilder();
             }My XML parser is configured as follows:
    public void loadData(final StringBuilder bufs)
         bufs.insert(0, "<VTR>");
         bufs.append("</VTR>");
         try
             StructuredDocumentHandler par = new StructuredDocumentHandler(
                  runningCount);
             SAXParserFactory spf = SAXParserFactory.newInstance();
             spf.setValidating(false);
             javax.xml.parsers.SAXParser sp = spf.newSAXParser();
             final String s = bufs.toString();
             final ByteArrayInputStream file_buf = new ByteArrayInputStream(s
                  .getBytes());
             final DataInputStream in_data = new DataInputStream(file_buf);
             org.xml.sax.InputSource input = new InputSource(in_data);
             sp.parse(input, par);
         catch (Exception ex)
             ex.printStackTrace();
        }As the parser goes through each XML message it sends the String to an output window that is straight text in a TextArea. It also stores the data in some arrays which then get built into a row that is added to a JTable. Does anyone have any ideas on how I can get up to 3000 lines per second? I'm not sure if my threading scheme is wrong or what. Is Java not powerful enough to handle 3000 TCP messages per second or can the XML parser not handle that much processing that fast? Any help would be much appreciated because I've kind of run out of ideas. Thanks!

    Thanks for the replies. I've trimmed my code down a little bit which has helped. I'm still around 2000 messages a second. Here's where I'm at for an update. Thanks again for all your help. I'm much happier at 2k vs 700 messages per second.
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.ByteArrayInputStream;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.InputStreamReader;
    import java.net.Socket;
    import java.util.ArrayList;
    import java.util.Calendar;
    import javax.swing.JOptionPane;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.helpers.DefaultHandler;
    public class MultiServerThread extends Thread
        private final StructuredDocumentHandler par = new StructuredDocumentHandler();
        private final SAXParserFactory spf = SAXParserFactory.newInstance();
        private SAXParser sp;
        public MultiServerThread(final Socket socket,
             final OutputWindow output_window,
             final ResultsWindow results_window,
             final PreferencesDialog.Info attr, final int count)
         try
             spf.setValidating(false);
             sp = spf.newSAXParser();
         catch (Exception ex)
        @Override
        public void run()
         try
             xml_copy_out.append("<VTR>\n");
             in = new BufferedReader(new InputStreamReader(socket
                  .getInputStream()));
             while ((input_line = in.readLine()) != null)
              file_out.append(input_line + StaticVariable.NEW_LINE);
              xml_copy_out.append(input_line + StaticVariable.NEW_LINE);
              loadData(input_line);
             xml_copy_out.append("</VTR>");
             xml_copy_out.close();
             file_out.close();
             in.close();
             attributes.parent.setCheckFailed(runningCount, procPassed);
             socket.close();
         catch (FileNotFoundException ex)
         catch (Exception e)
             e.printStackTrace();
       public void killOuts()
        public void loadData(final String xml_str)
         try
             ByteArrayInputStream file_buf = new ByteArrayInputStream(xml_str.getBytes());
             InputSource input = new InputSource(file_buf);
             sp.parse(input, par);
         catch (Exception ex)
             ex.printStackTrace();
        public void addRowData(boolean procedurePassed)
        public void clearArrays()
        public class StructuredDocumentHandler extends DefaultHandler
         boolean procedurePassed = true;
         boolean isTestCase = false;
         boolean isTestCaseInput = false;
         boolean isTestCaseOutput = false;
         boolean isTestStep = false;
         boolean isComment = false;
         boolean isRequirement = false;
         boolean isEnsure = false;
         boolean isVerify = false;
         boolean isResult = false;
         boolean eval = false;
         public StructuredDocumentHandler()
         public void startElement(String uri, String lname, String qname,
              Attributes attributes)
             if (!qname.equals(StaticVariable.XML_COMMAND))
              eval = true;
              if (qname.equals(StaticVariable.XML_TESTCASE))
                  isTestCase = true;
              else if (qname.equals(StaticVariable.XML_TESTCASEINPUT))
                  isTestCaseInput = true;
              else if (qname.equals(StaticVariable.XML_TESTCASEOUTPUT))
                  isTestCaseOutput = true;
              else if (qname.equals(StaticVariable.XML_TESTSTEP))
                  isTestStep = true;
              else if (qname.equals(StaticVariable.XML_COMMENT))
                  isComment = true;
              else if (qname.equals(StaticVariable.XML_REQUIREMENT))
                  isRequirement = true;
              else if (qname.equals(StaticVariable.XML_MEASUREMENT))
                  String xml_val = attributes
                       .getValue(StaticVariable.XML_VALUE);
                  outputWindow.addData(xml_val + StaticVariable.NEW_LINE);
                  measurementArray.add(xml_val);
              else if (qname.equals(StaticVariable.XML_EXPECTED))
                  String xml_val = attributes
                       .getValue(StaticVariable.XML_VALUE);
                  outputWindow.addData(xml_val + StaticVariable.NEW_LINE);
                  expectedArray.add(xml_val);
              else if (qname.equals(StaticVariable.XML_RESULT))
                  isResult = true;
              else if (qname.equals(StaticVariable.XML_VERIFY))
                  isVerify = true;
                  verifyArray.add(new String(attributes
                       .getValue(StaticVariable.XML_RESULT)));
              else if (qname.equals(StaticVariable.XML_ENSURE))
                  isEnsure = true;
         public void characters(char[] chars, int start, int length)
             if (eval)
              if (isTestCase)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseArray.add(new String(chars, start, length));
              else if (isTestCaseInput)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseInputArray.add(new String(chars, start, length));
              else if (isTestCaseOutput)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testCaseOutputArray.add(new String(chars, start, length));
              else if (isTestStep)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  testStepArray.add(new String(chars, start, length));
              else if (isComment)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  commentArray.add(new String(chars, start, length));
              else if (isRequirement)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  requirementArray.add(new String(chars, start, length));
              else if (isResult)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  resultArray.add(new String(chars, start, length));
              else if (isVerify)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  verifyDescriptionArray
                       .add(new String(chars, start, length));
              else if (isEnsure)
                  outputWindow.addData(new String(chars, start, length)
                       + StaticVariable.NEW_LINE);
                  ensureArray.add(new String(chars, start, length));
         public void endElement(String uri, String lname, String qname)
             if (!qname.equals(StaticVariable.XML_COMMAND))
              if (qname.equals(StaticVariable.XML_VERIFY))
                  addRowData(procedurePassed);
                  clearArrays();
              else if (qname.equals(StaticVariable.XML_END))
                  clearArrays();
              isTestCase = false;
              isTestCaseInput = false;
              isTestCaseOutput = false;
              isTestStep = false;
              isComment = false;
              isRequirement = false;
              isResult = false;
              isVerify = false;
              isEnsure = false;
              eval = false;
    }Any other suggestions on trimming down that I'm not seeing would be much appreciated. Thanks again for all your help.

  • How to find out the BI Publisher Version from the Excel output file

    Hi,
    Can any one tell me How to find out the BI Publisher Version from the Excel output file generated using BI publisher.

    Take a look at it in notepad or a text viewer... it's just a MIME/HTML file...
    Example:
    From: "Created by Oracle BI Publisher 10.1.3.4.0" <>
    Subject: Created by Oracle BI Publisher 10.1.3.4.

  • How to find out the BI Publisher Version from the Excel output generated.

    Hi
    Can any one tell me How to find out the BI Publisher Version from the Excel output file generated using BI publisher.
    Edited by: 781689 on Aug 1, 2010 10:22 PM

    Hello,
    This forum is the "Oracle Reports" OTN Forum.
    The "BI Publisher" OTN Forum is here :
    BI Publisher
    Regards

  • Add XML tag to the XML output File

    Experts,
    My Scenario is JDBC to File
    For the resultant xml file i have to append a line <?Test Line?> after
    <?xml version="1.0" encoding="UTF-8" ?> while passing it to legacy system ?
    From SDN I found that a XSLT Mapping(as second mapping in the Interface mapping) will do the above requirement,
    I got some XSLT Code from SDN to do this
    1) 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" />
      <xsl:template match="/">
    <!--  add processing instruction -->
      <xsl:processing-instruction
    name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
    <!--  copy payload -->
      <xsl:copy-of select="." />
      </xsl:template>
      </xsl:stylesheet>
    2) 
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" />
      <xsl:template match="/">
    <!--  add processing instruction -->
      <xsl:processing-instruction
    name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
    <!--  copy payload -->
      <xsl:copy-of select="." />
      </xsl:template>
      </xsl:stylesheet>
    But none of them worked for me, the additional tag does not appear on the o/p xml file
    Any help would be appreciated
    Srinivas

    Hello Srinivas,
    I had achieved the same using java mapping:
    Suppose your XML structure is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <Root Element>----
    </Root Element>
    you can use the following code:
              import java.io.*;
              import java.util.*;
              import com.sap.aii.mapping.api.*;
              public class AddCommentInXML implements StreamTransformation {
              String record=null;
              String comment=null;
              public void execute(InputStream in, OutputStream out) {
              try {
              DataInputStream stdin = new DataInputStream(in);
              int length = getLengthFromStream(stdin);
              stdin.reset();
              byte[] buffer = getBytesFromStream(stdin);
              String str = new String(buffer);
              record = "<Root Element>";
              comment ="<!Test Line><Root Element>";
              str = str.replaceAll(record,comment);
              out.write(str.getBytes());
              out.close();
              } catch (IOException e) {
              public int getLengthFromStream(InputStream is ) throws
              IOException{
              int i = 0;
              int length = 0;
              try{
              while ((i = is.read())> 0){
              length ++;
              }catch (ArrayIndexOutOfBoundsException e) {
              e.printStackTrace();
              return length;
              public byte[] getBytesFromStream(InputStream is) throws
              IOException {
    //             Create the byte array to hold the data
              byte[] bytes = new byte[getLengthFromStream(is)];
              is.reset();
    //             Read in the bytes
              int offset = 0;
              int tmp = 0;
              while (offset < bytes.length
              && (is.read(bytes, offset, offset +
              (tmp = is.available()))) > 0) {
              offset += tmp;
    //             Ensure all the bytes have been read in
              if (offset < bytes.length) {
              throw new IOException("Could not completely read Inputstream");
    //             Close the input stream and return bytes
              is.close();
              return bytes;
              public void setParameter(Map param) {
    Hope this helps.
    Regards,
    Shweta

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

  • How do I create individual xml files from the parsed data output of a xml file?

    I have written a program (DOM Parser) that parses data from a XMl File. I would like to create an individual file with the corresponding name for each set of data parsed from the xml document. If the parsed output is Single, Double, Triple, I would like to create an individual xml file (Single.xml, Double.xml, Triple.xml)with those corresponding names. How do I create the xml files and give each file the name of my parsed data output? Thanks in advance for your help.
    import java.io.IOException;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println("Template" + ": " +templateElement.getAttribute("name")+ ".xml");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

    Ive posted the new code but now I'm getting a FileAlreadyExistException error. How do I handle this exception error correctly in my code?
    import java.io.IOException;
    import java.nio.file.FileAlreadyExistsException;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class MyDomParser {
      public static void main(String[] args) {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      try {
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse("ENtemplate.xml");
      doc.normalize();
      NodeList rootNodes = doc.getElementsByTagName("templates");
      Node rootNode = rootNodes.item(0);
      Element rootElement = (Element) rootNode;
      NodeList templateList = rootElement.getElementsByTagName("template");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      System.out.println(templateElement.getAttribute("name")+ ".xml");
      for(int i=0; i < templateList.getLength(); i++) {
      Node theTemplate = templateList.item(i);
      Element templateElement = (Element) theTemplate;
      String fileName = templateElement.getAttribute("name") + ".xml";
      Files.createFile(Paths.get(fileName));
      System.out.println("File" + ":" + fileName + ".xml created");
      } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (SAXException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();

  • How to parse a XML file where tags have a underscore in them

    Hi,
        As per my current requirement I have a XML file where the tag names ( tags ) have a underscore in them like
    <root>
    <name_get>100<name_get>
    <name_set>200<name_set>
    </root?
         Can any let me know the following
    1) Can I read /parse such a XML file in Flex( is it possible)
    2) If yes How. Can any one forward me with example/docs/suggestions
    Regards
    Kalavati Singh
    [email protected]

    I use XML files with underscores in the node names all the time.
    In what context are you reading the files?  For example, if you're using an HTTPService object with a resultFormat of XML, and you databind an object to the lastResult of the HTTPService, the file gets parsed automagically (you have to setup a few things properly, but it's almost as simple as I describe).
    Do you need to manually parse the file?  If so, look into the XML, xmlList, Array and ArrayCollection datatypes.
    It'll be easier to help if you give an example of what you need to do.

Maybe you are looking for

  • Unable to deploy a simple servlet using WAR file

    Hi All, I am facing problem while deploying a simple servlet using WAR file on Oracle 9i App Server. I have installed Oracle 9i App Server. I referred following link to Deploy Applications Using WAR file:      http://otn.oracle.com/products/ias/daily

  • How do i get my music from one computer to another on itunes?

    I am trying to import my itunes nusic library from one computer to another. Is there a way to do this?

  • Jarsigner - how to enable the command

    Hi everyone, I am new to java but have a little IT networking knowledge. However in the command line i cannot seem to enable the jarsigner command. It always replies with ' jarsigner' is not recognised as an internal or external command, operable pro

  • SOAP http error

    Hi experts, I am testing webservice using XML SPY. Here i am sending requst to XI server, while sending i am getting below error. HTTP Error : Could not post a file please let me know the solution for this error. thnks srinivas

  • Problem in priting vendor certificatre.

    Hi. i am try to print vendor certificate J1INCERT. i fill all the values and when i execute then am not getting output and getting error message 'NODATA SELECTED FOR PRINTING'. Can u help me.its urgent. thanks.