Testing of IR without sample XML file

Hi Experts, Is there any way to test the Design part (IR) without using the sample XML file. and also Please let know How to test the Configuration part (ID) only, whether my setup in ID is correct or not?
Thanks in advance
- Manoj

Hii MaNoj !!
1) If mapping is thier Without XML u cant test IR design....
XI will always convert any input format to XML format (SOAP with attachments) for its own internal processing.
So text file will be converted to XML in XI and after mapping if you want the output again to be text file then you will have to use file content conversion to convert this XML back to text format using FCC in the receiver file adapter.
2) If you are not looking at doing any mapping (transformation) but just want to move a text file from one location to another in that case xml conversion can be avoided.
XI in the role of a FTP

Similar Messages

  • Coded UI Test - Data Driven using an XML File

     I have done data driven with csv and excel  but this is the first time i am trying to do with xml and not able to achieve it.
    I am using the below to access the xml file,
    [DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML", "|DataDirectory|\\xmlfile.xml", "xmlfile#xml", DataAccessMethod.Sequential), DeploymentItem("C:\\xxxxx\\xxx\\DataLibrary\\xmlfile.xml"), TestMethod]
    and the xmlfile.xml file looks like this,
    <?xml version="1.0" encoding="utf-8"?>
    <Data>
      <DataRow>
        <Num>123456</Num>
        <Name>action1</Name>    
      </DataRow>
      <DataRow>
        <Num>1412</Num>
        <Name>action2</Name>    
      </DataRow>    
    </Data>
    When I am trying to debug this is the error i am receiving,
    Result Message:
    The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
    Error details: Object reference not set to an instance of an object.
    BK

    Hi BK,
    There is anything wrong with your Datasource attribute.
    The correct DataSource attribute is like:
    [DataSource("Microsoft.VisualStudio.TestTools.DataSource.XML", "|DataDirectory|\\data.xml", "Iterations", DataAccessMethod.Sequential), DeploymentItem("data.xml"), TestMethod]
    Iterations is the name of the table in the xml file. On your side, it should be ‘DataRow’.
    If your xml file is not in the project directory, then you need specify the absolute path of the file in DeploymentItem option.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating sample XML file from Oracle Reports

    I did a search and could not find a good answer - hopefully this is not a dumb question.
    We are getting around to evaluating this tool, and I have looked at the whitepapers/user guides. I viewed the flash demo on how to build a template using the add-in. All of this seems really easy to do once you have the XML file generated.
    We have a custom report that outputted to PDF. Its a very simple report, so I went ahead and switch the output type to XML. When I go to view the file through the View Output button, it gives me an error about not being able to view it - the error says it cannot display the XML data with the current style sheet - gives a line number for the temporary file and thats about it.
    Question is this - should I be able to see the XML file through concurrent manager, or do I physically have to go the ouput directory and grab the file? I understand the whole process of hooking up a template to a concurrent program once I create it, but I figure having the data would make creating the template easier. Sort of a chicken and the egg things.
    Thanks!

    That sounds like a browser issue.
    once you flip the output to XML the 'Output' file from the concurrent manager will now be XML, try doing a save as rather than opening directly or use Tools>Copy file.
    Regards, Tim

  • How to import BC4J package into JDEV project without server.xml file?

    Dear,
    I need to bring the seeded BC4J package into my JDEV OAF project. Usually to do that, once I am sure that all I need is accessible, I open the server.xml file for the BC4J that I need and I am all set - all the items from under that BC4J are brought in.
    How about if there is no server.xml file for that BC4J, for example, under oracle.apps.icx.por.req.webui, and I need to have a controller from under there in my project? Do I create this package (oracle.apps.icx.por.req.webui) manually? If I do that and then open the controller the controller is being brought into JDEV outside the package.
    Thank you.
    Anatoliy

    Sumit,
    Thank for quick response.
    Yes, I agree for the controller.
    But let's say I want to bring over some other xml staff, like some shared regions for example from under that webui. They are also brought outside the package. You have an idea?
    Regards,
    Anatoliy

  • Using sample XML file from technical specifications, need a little help

    Hello,
    I copied and pasted the item text from the sample in the Apple technical specification. But there are a couple of places where I'm not clear what to change. I have a .M4V video file that I'm trying to podcast.
    Where it says "length" I don't know what it's looking for, I already entered a "duration" just below. Also, what would be the correct term for "type" for a .M4V video file?
    Then, there is the "guid" number and the actual file name as it is at the website. Can I make up any guid number, or does there have to be something at the site also called this, like the video file, which already has a name....confused.
    Thanks,
    TW
    BOXX Windows XP Pro

    Okay, I figured out what those entries needed to be, but I'm still not getting iTunes to recognize the feed.
    When I put the text file on the server, what do I call it so iTunes finds it?
    TW

  • Invalid tag generated in result XML file, xslt mapping done using MAPFORCE

    HI
    My requirement is File to File using xslt mapping
    I have done a very simple XSLT mapping, but through MAPFORCE tool
    Here are the steps, I followed:
    1. Supplied source xsd and xml file to MAPFORCE
    2. Supplied target xsd file
    3. mapped it as required
    4. tested by supplying a sample xml file by clicking OUTPUT button, which displays perfect XML structure
    5. Clicked XSLT button and copied and created a new file with extension .xsl file
    6. Zipped the above xsl file
    7. imported into IR imported archives folder
    8. Selected the above xslt mapping in my Interface mapping.
    9. Now tested my Interface Mapping by supplying sample some data for the source structure.
    Now I got the error or warning "XML not well-formed" and got the successfull completion message window for my mapping when I proceed.
    Now when I clicked xml source button for the target structure, It displays the invalid tag and starting with "#default"
    So If I removed this particular tag at the first and last lines, it becomes a valid xml structure and able to see properly in my internet explorer
    Here is the result I am getting:
    <?xml version="1.0" encoding="UTF-8"?>
    <#default:MT_Student_Result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:xsltMappingScenarios C:/DOCUME~1/Satya/Desktop/MT_Student_Result.xsd">
      <Data>
        <Name>Khan Raj</Name>
        <Marks>
          <Total_Marks>166</Total_Marks>
        </Marks>
      </Data>
    </#default:MT_Student_Result>
    When I tested through MAPFORCE it generates absolutely valid XML structure when I clicked OUTPUT button on MAPFORCE, but not when I used the xslt mapping through my interface mapping.
    What is the error I am making or any step missing?
    Please help me!
    Edited by: Shilpa Shetty on Oct 9, 2008 4:17 AM
    Edited by: Shilpa Shetty on Oct 9, 2008 5:58 AM
    Edited by: Chris Rock on Oct 9, 2008 6:06 AM

    For some reason when I use MapForce tool to generate my xslt mapping source, it is generating the following statement in the xsl file.
         <xsl:namespace-alias stylesheet-prefix="n" result-prefix="#default"/>
    So at the root element of XML file, it is replacing the character n with '#default' for some reason, I don;t know the purpose of this.
    As you suggested, I changed the name space, still I experienced same problem.
    It is now resolved after removing the above xsl statement from the xsl file before creating/uploading the relevant zip file into archives folder.
    It works fine now. Thanks for the clue.

  • Extracting data from a tag of  xml file which is(xml) in a  Field of Csv.

    We have a xlm script which is stored in the clob column of the csv file. we have to extract one value from the <tag> and reject remaining data.
    Sample:-
    <ROW>
    <ID>100</ID>
    <ORDER_DATE>2000.12.20</ORDER_DATE>
    <SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
    <SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
    <SHIPTO_CITY>Redwood City</SHIPTO_CITY>
    <SHIPTO_STATE>CA</SHIPTO_STATE>
    <SHIPTO_ZIP>94065</SHIPTO_ZIP>
    </ROW>
    Required Output:-
    We have to extract the "500 Marine World Parkway"
    from tag <SHIPTO_STREET>
    and the above sample xml file is in one of the column which is clob datatype
    Any idea How to perform the above activity in PL/SQL ?

    As BP suggested you can use an XPATH query to extract that information from your XML. However it depends a bit on your XML data.
    Here are two examples:
    one row XML
    select extractvalue(xmltype('<ROW>
    <ID>100</ID>
    <ORDER_DATE>2000.12.20</ORDER_DATE>
    <SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
    <SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
    <SHIPTO_CITY>Redwood City</SHIPTO_CITY>
    <SHIPTO_STATE>CA</SHIPTO_STATE>
    <SHIPTO_ZIP>94065</SHIPTO_ZIP>
    </ROW>')
    ,'//SHIPTO_STREET/text()') as result
    from dual;
    RESULT
    500 Marine World Parkway
    multi rows XML
    select extractvalue(column_value,'SHIPTO_STREET/text()') as result
    from table(xmlsequence(extract(xmltype('<ROWS>
    <ROW>
      <ID>100</ID>
      <ORDER_DATE>2000.12.20</ORDER_DATE>
      <SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
      <SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
      <SHIPTO_CITY>Redwood City</SHIPTO_CITY>
      <SHIPTO_STATE>CA</SHIPTO_STATE>
      <SHIPTO_ZIP>94065</SHIPTO_ZIP>
    </ROW>
    <ROW>
      <ID>200</ID>
      <ORDER_DATE>2000.12.20</ORDER_DATE>
      <SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
      <SHIPTO_STREET>Test</SHIPTO_STREET>
      <SHIPTO_CITY>Redwood City</SHIPTO_CITY>
      <SHIPTO_STATE>CA</SHIPTO_STATE>
      <SHIPTO_ZIP>94065</SHIPTO_ZIP>
    </ROW>
    </ROWS>'
    ),'ROWS/ROW/SHIPTO_STREET')));
    RESULT
    500 Marine World Parkway
    Test

  • Reading an XML file and write the contents to another xml file in java

    Hi,
    I am new to xml parsing.My requirement is that I am getting a message (xml) using ibm MQ in the ByteArrayInputStream format.I have to read this xml message and write to another file.
    I am creating a POC for this.
    First I used simple reading and writing concept but the output is "java.io.FileInputStream@3e25a5 "
    Sample xml file
    - <Client>
    <ClientId>1234</ClientId>
    <ClientName>STechnology</ClientName>
    <DTU_ID>567</DTU_ID>
    <ClientStatus>ACTIVE</ClientStatus>
    - <LEAccount>
    <ClientLE>678989</ClientLE>
    <LEId>56743</LEId>
    - <Account>
    <AccountNumber>9876543678</AccountNumber>
    </Account>
    </LEAccount>
    - <Service>
    <Cindicator>Y2Y</Cindicator>
    <PrefCode>980</PrefCode>
    <BSCode>876</BSCode>
    <MandatoryContent>MSP</MandatoryContent>
    </Service>
    </Client>
    code:
    import java.io.ByteArrayInputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              byte currentXMLBytes[] = inputStream.toString().getBytes();
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    Please suggest me how can I use DOM/SAX parser ,I can see several code on net for reading xml file using SAX/DOM parser but writing an xml file after reading it using ByteArrayInputStream I am not getting .A help through some example Link will also be helpful for me.
    Thanks
    Sumit
    Edited by: user8687839 on Apr 30, 2012 2:37 AM
    Edited by: user8687839 on Apr 30, 2012 2:43 AM

    Thanks I got the result.
    package com.sumit.collections;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              ByteArrayOutputStream buffer = new ByteArrayOutputStream();
              int nRead; byte[] data = new byte[1024];
              while ((nRead = inputStream.read(data, 0, data.length)) != -1) {
              buffer.write(data, 0, nRead); } buffer.flush();
              byte currentXMLBytes[]= buffer.toByteArray();
              /* byte currentXMLBytes[] = inputStream.toString().getBytes();*/
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    }

  • Need help on parsing xml file...

    Hi all,
    I need to collect some data from an Xml file using java. I have the following code with me but I am unable to get the required result. I am unable to get the data from the tags belonging to the header and footer elements. Please find the code and the sample xml file below.
    Program to parse XML:
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    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.NodeList;
    import org.xml.sax.SAXException;
    public class JobLogDetails3{
         //No generics
         List myJobs;
         Document dom;
         public JobLogDetails3(){
              //create a list to hold the job objects
              myJobs = new ArrayList();
         public void runJobDetails() {
              //parse the xml file and get the dom object
              parseXmlFile();
              //get each joblog element and create a job object
              parseDocument();
              //Iterate through the list and print the data
              printData();
         private void parseXmlFile(){
              //get the factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              try {
                   //Using factory get an instance of document builder
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   //parse using builder to get DOM representation of the XML file
                   dom = db.parse("test.xml");
              }catch(ParserConfigurationException pce) {
                   pce.printStackTrace();
              }catch(SAXException se) {
                   se.printStackTrace();
              }catch(IOException ioe) {
                   ioe.printStackTrace();
         private void parseDocument(){
              //get the root elememt
              Element docEle = dom.getDocumentElement();
              //get a nodelist of <joblog> elements
              NodeList nl = dom.getElementsByTagName("*");
              if(nl != null && nl.getLength() > 0) {
                   for(int i = 0 ; i < nl.getLength();i++) {
                        //get the joblog element
                        Element el = (Element)nl.item(i);
                        //get the joblog object
                        Job J = getJob(el);
                        //add it to list
                        myJobs.add(J);
         * I take an joblog element and read the values in, create
         * an joblog object and return it
         * @param JobEl
         * @return
         private Job getJob(Element JobEl) {
              //for each <joblog> element get text or int values of
              //name ,id, age and name
              String jobServer = getTextValue(JobEl,"server");
              String jobName = getTextValue(JobEl,"name");
              String jobClient = getTextValue(JobEl,"machine_name");
              String jobStart = getTextValue(JobEl,"start_time");
              String jobType = getTextValue(JobEl,"type");
              String jobEnd = getTextValue(JobEl,"end_time");
              String jobSize = getTextValue(JobEl,"new_processed_bytes");
              //Create a new Job with the value read from the xml nodes
              Job J = new Job(jobServer,jobName,jobClient,jobStart,jobType,jobEnd,jobSize);
              return J;
         * I take a xml element and the tag name, look for the tag and get
         * the text content
         * i.e for <employee><name>John</name></employee> xml snippet if
         * the Element points to employee node and tagName is name I will return John
         * @param ele
         * @param tagName
         * @return
         private String getTextValue(Element ele, String tagName) {
              String textVal = null;
              NodeList nl = ele.getElementsByTagName(tagName);
              if(nl != null && nl.getLength() > 0) {
                   Element el = (Element)nl.item(0);
                   textVal = el.getFirstChild().getNodeValue();
              return textVal;
         * Calls getTextValue and returns a int value
         * @param ele
         * @param tagName
         * @return
         private int getIntValue(Element ele, String tagName) {
              //in production application you would catch the exception
              return Integer.parseInt(getTextValue(ele,tagName));
         * Iterate through the list and print the
         * content to console
         private void printData(){
              System.out.println("No of Jobs '" + myJobs.size() + "'.");
              Iterator it = myJobs.iterator();
              while(it.hasNext()) {
                   System.out.println(it.next().toString());
         public static void main(String[] args){
              //create an instance
              JobLogDetails JLD = new JobLogDetails();
              //call run example
              JLD.runJobDetails();
    Job Class
    public class Job {
         private String jobServer;
    private String jobName;
    private String jobClient;
    private String jobStart;
    private String jobType;
    private String jobEnd;
    private String jobSize;
         public Job(){
         public Job(String jobServer,String jobName,String jobClient,String jobStart,String jobType,String jobEnd,String jobSize ) {
              this.jobServer = jobServer;
              this.jobName = jobName;
              this.jobClient = jobClient;
    this.jobStart = jobStart;
              this.jobType = jobType;
    this.jobEnd = jobEnd;
    this.jobSize = jobSize;
         public String getjobServer() {
              return jobServer;
         public void setjobServer(String jobServer) {
              this.jobServer = jobServer;
         public String getjobName() {
              return jobName;
         public void setjobname(String jobName) {
              this.jobName = jobName;
         public String getjobClient() {
              return jobClient;
         public void setjobClient(String jobClient) {
              this.jobClient = jobClient;
    public String getjobStart() {
              return jobStart;
         public void setjobStart(String jobStart) {
              this.jobStart = jobStart;
    public String getjobType() {
              return jobType;
         public void setjobType(String jobType) {
              this.jobType = jobType;
    public String getjobEnd() {
              return jobEnd;
         public void setjobEnd(String jobEnd) {
              this.jobEnd = jobEnd;
    public String getjobSize() {
              return jobSize;
         public void setjobSize(String jobSize) {
              this.jobSize = jobSize;
         public String toString() {
              StringBuffer sb = new StringBuffer();
    sb.append(getjobServer());
              sb.append(",");
    sb.append(getjobName());
              sb.append(",");
              sb.append(getjobClient());
              sb.append(",");
              sb.append(getjobType());
              sb.append(",");
              sb.append(getjobStart());
              sb.append(",");
              sb.append(getjobEnd());
              sb.append(",");
              sb.append(getjobSize());
              sb.append(",");
              return sb.toString();
    Sample XML File:
    <?xml version="1.0" encoding="UTF-16" ?>
    - <joblog>
    <job_log_version version="2.0" />
    - <header>
    <filler>======================================================================</filler>
    <server>Job server: TGBBAK</server>
    <name>Job name: TGBSAP4-SQL-SQL DB Servers S2T - High-Weekly Full Backup</name>
    <start_time>Job started: 26 September 2011 at 01:00:04</start_time>
    <type>Job type: Backup</type>
    <log_name>Job Log: GFD_TGBBAK_71887.xml</log_name>
    <filler>======================================================================</filler>
    </header>
    <media_mount_date>Drive and media mount requested: 26/09/2011 01:00:04</media_mount_date>
    - <media_drive_and_media_info>
    <media_mount_date>Drive and media information from media mount: 26/09/2011 01:00:39</media_mount_date>
    <robotic_library_name>Robotic Library Name: HP 1</robotic_library_name>
    <drive_name>Drive Name: LTO4_2</drive_name>
    <slot>Slot: 43</slot>
    <media_label>Media Label: 000059L</media_label>
    <media_guid>Media GUID: {a6ca0062-7a6f-4b4b-8144-732ca25f2f9d}</media_guid>
    <media_overwrite_date>Overwrite Protected Until: 25/10/2011 19:24:58</media_overwrite_date>
    <media_append_date>Appendable Until: 02/10/2011 14:00:30</media_append_date>
    <media_set_target>Targeted Media Set Name: Weekly Tape</media_set_target>
    </media_drive_and_media_info>
    - <backup>
    <filler>======================================================================</filler>
    <title>Job Operation - Backup</title>
    <append_or_overwrite>Media operation - append.</append_or_overwrite>
    <compression>Compression Type: Hardware [if available, otherwise none]</compression>
    <verify_option>WARNING: The option 'Verify after backup completes' was not selected. Performing a verify operation to make sure that media can be read after the backup has completed is recommended.</verify_option>
    <filler>======================================================================</filler>
    - <machine>
    <machine_name>TGBSAP4.Tetley.Grp</machine_name>
    <info>Network control connection is established between 10.22.2.18:3271 <--> 10.22.2.4:10000</info>
    <info>Network data connection is established between 10.22.2.18:3301 <--> 10.22.2.4:3094</info>
    - <set>
    <set_resource_name>TGBSAP4.Tetley.Grp</set_resource_name>
    <tape_name>Family Name: "Media created 25/09/2011 13:59:55"</tape_name>
    - <volume>
    <display_volume>Backup of "TGBSAP4.Tetley.Grp "</display_volume>
    </volume>
    <description>Backup set #45 on storage media #1 Backup set description: "Weekly Full Backup"</description>
    <backup_type>Backup Method: Full - Back up entire database or filegroup</backup_type>
    <agent_started>Microsoft SQL Server Agent: Started</agent_started>
    <start_time>Backup started on 26/09/2011 at 01:01:45.</start_time>
    - <database>
    <database>Database PRD</database>
    </database>
    - <database>
    <database>Database master</database>
    </database>
    - <database>
    <database>Database model</database>
    </database>
    - <database>
    <database>Database msdb</database>
    </database>
    <end_time>Backup completed on 26/09/2011 at 02:42:25.</end_time>
    - <summary>
    <backed_up_database>Backed up 4 databases</backed_up_database>
    <new_processed_bytes>Processed 573363576542 bytes in 1 hour, 40 minutes, and 40 seconds.</new_processed_bytes>
    <vlm_hist_rateformat2>Throughput rate: 5432 MB/min</vlm_hist_rateformat2>
    </summary>
    <filler>----------------------------------------------------------------------</filler>
    </set>
    </machine>
    </backup>
    - <footer>
    <filler>======================================================================</filler>
    <end_time>Job ended: 26 September 2011 at 02:43:12</end_time>
    <engine_completion_status>Job completion status: Successful</engine_completion_status>
    <filler>======================================================================</filler>
    <completeStatus>19</completeStatus>
    </footer>
    </joblog>

    1. your code does not compile (in your main method you try to create an instance of a class which does not exist).
    2. your XML document is not well formed.
    +[Fatal Error] test.xml:34:74: The content of elements must consist of well-formed character data or markup.+
    org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
    Maybe there are other problems but you can start by fixing these.

  • Using JSP / Java to write/create an xml file

    I have been looking around the internet and in my books and I cannot find a good example of JAVA/JSP writing an XML file. I already have a recursive method that will generate the xml .. what's missing in my code now is how am i goin to append or write that xml string into an existing file..
    suppose i have this xml string
    String xmlString = "<?xml version="1.0"?><txn><test>this is just a test</test></txn>";
    FileOutputStream fos = new FileOutPutStream(C://files/sample.xml);
    now , how i will write the xmlString into sample.xml file...
    Any suggestions/ ideas/ tutorial links would be deeply appreciated.. thx!

    never mind.. my code is workin now..

  • Unable to create a data server for xml file

    Hi ,
    I have created a data server for a xml file but when i test the connection i am getting the below error.
    java.sql.SQLException: class org.xml.sax.SAXException
    Prefix not found: xsi
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
    at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
    at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1100)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:371)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:794)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:754)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:137)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:133)
    at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:87)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6263)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Can any one help me out with this issue ?
    Thanks in advance,
    Balajitk

    HI Balaji,
    Below is the sample xml file which i have saved as test.xml and placed it @ D: drive
    Test.xml:
    <employee>
    <emp>
    <eno>1</eno>
    <ename>Test1</ename>
    </emp>
    <emp>
    <eno>2</eno>
    <ename>Test2</ename>
    </emp>
    <emp>
    <eno>2</eno>
    <ename>Test2</ename>
    </emp>
    </employee>
    Goto Topology >Expand Technologues>right click on XML and select new data source
    in Defination Tab, provide the physical architecture name
    in JDBC Tab, provide the below details
    JDBC Driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    JDBC URL: jdbc:snps:xml?f=d:\test.xml&d=test.dtd&re=employee&s=TEST&ro=false
    Save it
    Click on Test Connection and again click on test, it should show test connection as "Successfully Test"
    Hope this may helps you
    Regards,
    Phanikanth

  • Help to rebuild a badly formed Index.xml file

    From time to time, I receive Numbers documents whose Index.xml file may be read by several programs but which can't be deciphered by Numbers itself.
    My guess is that for some reason, Numbers built a wrong instruction.
    Of course, it's annoying because many users don't backup their documents or use a wrong protocol to backup.
    Never replace an old backup by a new one before checking that the new one is usable is the rule to apply.
    Given that, I built an AppleScript which may help us to rebuild from scratch such a clobbered document.
    Running it upon such a file creates a folder in the Documents folder.
    In this new folder we will find several text files describing every sheet embedded in the document.
    In each of these file, it inserts tags marking delimiting the descriptors of every table.
    It also insert pairs of return characters between every cell descriptor.
    Last not least, it completes the codes describing references to other tables or to other sheet or to other table of other sheet by their "standard" description, the one which is used in the true formulas.
    Useful information, as often in AppleLand, consecutive objects are numbered starting from zero when we are accustomed to number them starting from 1.
    sf:col="0" means column number(0+1) which is column A
    sf:row="0" means row number (0+1)
    Given all these informations, rebuilding a document is quite easy (but it requires a lot of time and is boring for eyes).
    As the script is long and as I am afraid of the oddities which may be introduced by the forum's message parser, the script is not available here but on my iDisk.
    <http://idisk.me.com/koenigyvan-Public?view=web>
    Download:
    ForiWork:For_Numbers:découpe_Index_deNumbers.zip
    I apologize but given a bug of MacOS X 10.5.x, using the script under this operating system is less comfortable than it is under 10.4.x.
    Yvan KOENIG (from FRANCE mardi 26 août 2008 16:16:46)

    HI Balaji,
    Below is the sample xml file which i have saved as test.xml and placed it @ D: drive
    Test.xml:
    <employee>
    <emp>
    <eno>1</eno>
    <ename>Test1</ename>
    </emp>
    <emp>
    <eno>2</eno>
    <ename>Test2</ename>
    </emp>
    <emp>
    <eno>2</eno>
    <ename>Test2</ename>
    </emp>
    </employee>
    Goto Topology >Expand Technologues>right click on XML and select new data source
    in Defination Tab, provide the physical architecture name
    in JDBC Tab, provide the below details
    JDBC Driver: com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    JDBC URL: jdbc:snps:xml?f=d:\test.xml&d=test.dtd&re=employee&s=TEST&ro=false
    Save it
    Click on Test Connection and again click on test, it should show test connection as "Successfully Test"
    Hope this may helps you
    Regards,
    Phanikanth

  • Parsing XML file & insert into Oracle Tables

    Hi,
    Following is a sample xml file which is an input for a oracle procedure :
    <Sales ID="1" CreatedDate="16-Jan-2007" CreatedTime="16:09:40">
    <Customer ID="1" Name="Scott" Address="City1">
         <Order ID="1" Date="15-Jan-2007" TotItems="2" Value="200">
              <Item ID="01" Name="Chocolate" Qty="2" Amount="80" />
              <Item ID="03" Name="Biscuit" Qty="5" Amount="120" />
         </Order>
    </Customer>
    <Customer ID="2" Name="Tiger" Address="City2">
         <Order ID="1" Date="15-Jan-2007" TotItems="1" Value="500">
              <Item ID="01" Name="Pizza" Qty="3" Amount="500" />
         </Order>
    </Customer>
    <User ID="ABC" Name="TestUser" LastLogin="16-Jan-2007" />
    <City Code="NY" Name="New York" />
    <City Code="NJ" Name="New Jersy" />
    </Sales>
    I have individual tables for Sales, Customer, Order, Item, User & City tags with proper referential constraints. I have to parse the xml & have to insert the corresponsing tables for each & every tag if the ID in individual tag does not exists in the table. If the ID already exist, then, I have to update other attributes in the table for the corresponding ID.
    Can anyone suggest me the simplest way to perform the above said scenario?

    Dera Michael,
    Sorry for the confusing previous reply. I went through your solution again and tried for my XML File.
    I have stored the XML File in table XXLF_DS_XML.Should I make use of the table in the below query.
    Here is my SQL Query erroring Out
    SQL> SELECT EXTRACTVALUE(s.COLUMN_VALUE,
    2 '/Header@orderID') ID
    3 ,EXTRACTVALUE(c.COLUMN_VALUE,
    4 '/Detail@lineNumber') lienum
    5 ,EXTRACTVALUE(t.COLUMN_VALUE,
    6 '/Detail/Tax@currency') currency
    7 ,EXTRACTVALUE(t.COLUMN_VALUE,
    8 '/Detail/Tax/Money') customer_name
    9 FROM TABLE(XMLSEQUENCE(EXTRACT(XMLTYPE('- <Recordset>
    10 - <Header dueDate="2007-01-17T16:09:05" orderDate="2004-01-17" orderID="0009" transactionID="1389"
    type="new">
    11 <KeyIndex>2</KeyIndex>
    12 - <BillTo>
    13 - <Address addressID="5619" isoCountryCode="US">
    14 <Name>fMat</Name>
    15 - <PostalAddress name="default">
    16 <Street>34545</Street>
    17 <City>dfgfg</City>
    18 <State>AZ</State>
    19 <PostalCode>85086-1693</PostalCode>
    20 <County>Maricopa</County>
    21 <Country>US</Country>
    22 </PostalAddress>
    23 <Email name="default">[email protected]</Email>
    24 </Address>
    25 </BillTo>
    26 <PromotionCode />
    27 - <SubTotal>
    28 <Money currency="USD">32.49</Money>
    29 </SubTotal>
    30 - <Tax>
    31 <Money currency="USD">2.32</Money>
    32 <Description />
    33 </Tax>
    34 - <Shipping>
    35 <Money currency="USD">8.95</Money>
    36 <Description />
    37 </Shipping>
    38 </Header>
    39 - <Detail lineNumber="1" quantity="1">
    40 - <ItemDetail>
    41 - <UnitPrice>
    42 <Money currency="USD">29.99</Money>
    43 </UnitPrice>
    44 <ShortName>Little;reg; pxxxx® Learning System</ShortName>
    45 </ItemDetail>
    46 - <Tax>
    47 <Money currency="USD">1.68</Money>
    48 <Description />
    49 - <TaxDetail category="sales">
    50 - <TaxAmount>
    51 <Money currency="USD">1.68</Money>
    52 </TaxAmount>
    53 <TaxLocation>AZ</TaxLocation>
    54 </TaxDetail>
    55 </Tax>
    56 </Detail>
    57 - <Detail lineNumber="2" quantity="1">
    58 - <ItemDetail>
    59 - <UnitPrice>
    60 <Money currency="USD">29.99</Money>
    61 </UnitPrice>
    62 <ShortName>Little;reg; pxxxx® Learning System</ShortName>
    63 </ItemDetail>
    64 - <Tax>
    65 <Money currency="USD">1.68</Money>
    66 <Description />
    67 - <TaxDetail category="sales">
    68 - <TaxAmount>
    69 <Money currency="USD">1.68</Money>
    70 </TaxAmount>
    71 <TaxLocation>AZ</TaxLocation>
    72 </TaxDetail>
    73 </Tax>
    74 - <Tax>
    75 <Money currency="USD">0.68</Money>
    76 <Description />
    77 - <TaxDetail category="sales">
    78 - <TaxAmount>
    79 <Money currency="USD">0.68</Money>
    80 </TaxAmount>
    81 <TaxLocation>DISTRICT</TaxLocation>
    82 </TaxDetail>
    83 </Tax>
    84 </Detail>
    85 </Recordset>'),'/Recordset/Header'))) s
    86 ,TABLE(XMLSEQUENCE(EXTRACT(c.COLUMN_VALUE,
    87 '/Recordset/Detail'))) c
    88 ,TABLE(XMLSEQUENCE(EXTRACT(t.COLUMN_VALUE,
    89 '/Recordset/Detail/Tax'))) t
    90 /
    ,TABLE(XMLSEQUENCE(EXTRACT(c.COLUMN_VALUE,
    ERROR at line 86:
    ORA-00904: "C"."COLUMN_VALUE": invalid identifier
    Here is my XML Data
    <Recordset>
    <Header dueDate="2007-01-17T16:09:05" orderDate="2004-01-17" orderID="0009" transactionID="1389"
    type="new">
    <KeyIndex>2</KeyIndex>
    <BillTo>
    <Address addressID="5619" isoCountryCode="US">
    <Name>fMat</Name>
    <PostalAddress name="default">
    <Street>34545 </Street>
    <City>dfgfg</City>
    <State>AZ</State>
    <PostalCode>85086-1693</PostalCode>
    <County>Maricopa</County>
    <Country>US</Country>
    </PostalAddress>
    <Email name="default">[email protected]</Email>
    </Address>
    </BillTo>
    <PromotionCode/>
    <SubTotal>
    <Money currency="USD">32.49</Money>
    </SubTotal>
    <Tax>
    <Money currency="USD">2.32</Money>
    <Description/>
    </Tax>
    <Shipping>
    <Money currency="USD">8.95</Money>
    <Description/>
    </Shipping>
    </Header>
    <Detail lineNumber="1" quantity="1">
    <ItemDetail>
    <UnitPrice>
    <Money currency="USD">29.99</Money>
    </UnitPrice>
    <ShortName>Little;reg; pxxxx® Learning System </ShortName>
    </ItemDetail>
    <Tax>
    <Money currency="USD">1.68</Money>
    <Description/>
    <TaxDetail category="sales">
    <TaxAmount>
    <Money currency="USD">1.68</Money>
    </TaxAmount>
    <TaxLocation>AZ</TaxLocation>
    </TaxDetail>
    </Tax>
    </Detail>
    <Detail lineNumber="2" quantity="1">
    <ItemDetail>
    <UnitPrice>
    <Money currency="USD">29.99</Money>
    </UnitPrice>
    <ShortName>Little;reg; pxxxx® Learning System </ShortName>
    </ItemDetail>
    <Tax>
    <Money currency="USD">1.68</Money>
    <Description/>
    <TaxDetail category="sales">
    <TaxAmount>
    <Money currency="USD">1.68</Money>
    </TaxAmount>
    <TaxLocation>AZ</TaxLocation>
    </TaxDetail>
    </Tax>
    <Tax>
    <Money currency="USD">0.68</Money>
    <Description/>
    <TaxDetail category="sales">
    <TaxAmount>
    <Money currency="USD">0.68</Money>
    </TaxAmount>
    <TaxLocation>DISTRICT</TaxLocation>
    </TaxDetail>
    </Tax>
    </Detail>
    </Recordset>
    Thanks

  • Getting ORA-22805 when trying to load XML file using SQLLDR

    I'm trying to learn the basics of XML since we'll be getting XML files in the near future. I'm using one of the sample schemas that comes with XMLSPY. I loaded this schema into an 11g Oracle DB using XMLSPY:
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XML Spy v4.0 NT beta 1 build Jun 13 2001 (http://www.xmlspy.com) by Alexander Falk (Altova, Inc.) -->
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ipo="http://www.altova.com/IPO" targetNamespace="http://www.altova.com/IPO" elementFormDefault="unqualified" attributeFormDefault="unqualified">
         <annotation>
              <documentation>
    International Purchase order schema for Example.com
    Copyright 2000 Example.com. All rights reserved.
    </documentation>
         </annotation>
         <!-- include address constructs -->
         <include schemaLocation="address.xsd"/>
         <element name="purchaseOrder" type="ipo:PurchaseOrderType"/>
         <element name="comment" type="string"/>
         <complexType name="PurchaseOrderType">
              <sequence>
                   <element name="shipTo" type="ipo:Address"/>
                   <element name="billTo" type="ipo:Address"/>
                   <element ref="ipo:comment" minOccurs="0"/>
                   <element name="Items" type="ipo:Items"/>
              </sequence>
              <attribute name="orderDate" type="date"/>
         </complexType>
         <complexType name="Items">
              <sequence>
                   <element name="item" minOccurs="0" maxOccurs="unbounded">
                        <complexType>
                             <sequence>
                                  <element name="productName" type="string"/>
                                  <element name="quantity">
                                       <simpleType>
                                            <restriction base="positiveInteger">
                                                 <maxExclusive value="100"/>
                                            </restriction>
                                       </simpleType>
                                  </element>
                                  <element name="price" type="decimal"/>
                                  <element ref="ipo:comment" minOccurs="0"/>
                                  <element name="shipDate" type="date" minOccurs="0"/>
                             </sequence>
                             <attribute name="partNum" type="ipo:Sku"/>
                        </complexType>
                   </element>
              </sequence>
         </complexType>
         <simpleType name="Sku">
              <restriction base="string">
                   <pattern value="\d{3}-[A-Z]{2}"/>
              </restriction>
         </simpleType>
    </schema>
    Then I created an XMLType table:
    CREATE TABLE purchaseOrder OF XMLType
    XMLSCHEMA "ipo.xsd" ELEMENT "purchaseOrder"
    I'm trying to load the sample XML file ipo.xml into purchaseOrder using SQLLDR. This is ipo.xml:
    <?xml version="1.0"?>
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Mr. Nobody (Altova GmbH) -->
    <ipo:purchaseOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ipo="http://www.altova.com/IPO" orderDate="1999-12-01" xsi:schemaLocation="http://www.altova.com/IPO
    ipo.xsd">
         <shipTo export-code="1" xsi:type="ipo:EU-Address">
              <ipo:name>Helen Zoe</ipo:name>
              <ipo:street>47 Eden Street</ipo:street>
              <ipo:city>Cambridge</ipo:city>
              <ipo:postcode>126</ipo:postcode>
         </shipTo>
         <billTo xsi:type="ipo:US-Address">
              <ipo:name>Robert Smith</ipo:name>
              <ipo:street>8 Oak Avenue</ipo:street>
              <ipo:city>Old Town</ipo:city>
              <ipo:state>AK</ipo:state>
              <ipo:zip>95819</ipo:zip>
         </billTo>
         <Items>
              <item partNum="833-AA">
                   <productName>Lapis necklace</productName>
                   <quantity>2</quantity>
                   <price>99.95</price>
                   <ipo:comment>Need this for the holidays!</ipo:comment>
                   <shipDate>1999-12-05</shipDate>
              </item>
              <item partNum="748-OT">
                   <productName>Diamond heart</productName>
                   <quantity>1</quantity>
                   <price>248.90</price>
                   <ipo:comment>Valentine's day packaging.</ipo:comment>
                   <shipDate>2000-02-14</shipDate>
              </item>
              <item partNum="783-KL">
                   <productName>Uncut diamond</productName>
                   <quantity>7</quantity>
                   <price>79.90</price>
                   <shipDate>2000-01-07</shipDate>
              </item>
              <item partNum="238-KK">
                   <productName>Amber ring</productName>
                   <quantity>3</quantity>
                   <price>89.90</price>
                   <ipo:comment>With no inclusions, please.</ipo:comment>
                   <shipDate>2000-01-07</shipDate>
              </item>
              <item partNum="229-OB">
                   <productName>Pearl necklace</productName>
                   <quantity>1</quantity>
                   <price>4879.00</price>
                   <shipDate>1999-12-05</shipDate>
              </item>
              <item partNum="128-UL">
                   <productName>Jade earring</productName>
                   <quantity>5</quantity>
                   <price>179.90</price>
                   <shipDate>2000-02-14</shipDate>
              </item>
         </Items>
    </ipo:purchaseOrder>
    This is what's in the control file:
    LOAD DATA
    INFILE *
    INTO TABLE purchaseOrder TRUNCATE
    xmltype(xmldata)
    FIELDS
    xmldata LOBFILE (CONSTANT ipo.xml)
    BEGINDATA
    0
    The load fails with:
    Record 1: Rejected - Error on table PURCHASEORDER.
    ORA-22805: cannot insert NULL object into object tables or nested tables
    Another question I have is, how do we know how many records (0's) to specify in the control file? In this case there's only one but when real files are used we won't know how many are in the file.
    Thanks for your help!

    The concept was "Don't use SQL*Loader to parse XML".
    You can use SQL*Loader to load an entire XML document into the DB. That is fine. You can do the same via BFILENAME to read in files from disk as well.
    If you want to parse XML, do that from within Oracle via PL/SQL and/or SQL. The solution depends upon your version of Oracle and what is good enough for you in terms of performance.
    So the basics are
    a) How am I getting the information?
    b) How am I getting in into Oracle?
    c) How do I want to parse it?
    As I see the schema, it only allows for one ipo:purchaseOrder node in the document, since that is the root node. If you have multiple in the incoming file, you no longer have valid XML, both per the schema and because you have no single root node. You have an XML fragment, which must be treated different.
    Just trying to understand the question since I now realize it does not agree with what the schema in your initial example shows.

  • XML file not updating

    The imsmanifest.xml doesn't seem to be updated after I have
    completed the test in the presentation. I have tried all the
    settings in quiz manager.
    I am suppose to see the test results in the imsmanifest.xml
    file, right?

    did you use the site list manager tool, or edit the XML by hand?
    if you edited by hand, did you increase the file version number ?
    http://technet.microsoft.com/en-us/library/dn640701.aspx
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

Maybe you are looking for

  • Why are both SQL_ID and PREV_SQL_ID null?

    session A is blocking session B. it was row-level lock. But, why are both SQL_ID and PREV_SQL_ID null in session A?

  • Adjusting black and white contrast on Photosmart 7520 whilst copying

    I can't find any instruction on how to adjust copying contrast on black and white copies..

  • Transport Sales Area Data from CRM to R/3

    I have created a function module within DSAVE event in BDT so the Sales Area BILLING BLOCK REASON could be updated with a fixed value according to the Sales Area selected by the user. That worked all right using the standard function module CRM_BUPA_

  • Cannot Restore Windows 7

    A relative came to me, asking for help. The notebook is a HP Pavillon dm4-2040ez. I found out that HP warranty was just over and the harddisk was broken. So we ordered a new SSD and I installed a clean version of Windows 7 from my DVD, but did not ac

  • Please help me with two Java problems

    Hello, I have 2 Java problems to work on and wondered if someone can help please? 1. I've created an array, but I have to now create a text file and write a program to read the array from the file. I have no idea where to start the program! 2.public