Condtion check in txt to xml

hi
experts
whlie converting txt file to xml i need check the keyfiled value of three fileds .if doesnt match we need rise execption .
i tested with given keyfiledvalues is wrong in my source txt file .just it skiping worng keyfiled value records.
how can i achvie this there is any technigue in content conversion or how can i do this?
thanks&regards
kumar narendra

Hey
have a look at the following,
/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping
also have a look at the following
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
thanx
ahmad
Message was edited by:
        Ahmad

Similar Messages

  • Error in Flatfile (txt) to xml file scenario

    hi,
    while executing the Flat file (txt) to xml file  scenario, the txt file picked up from my source directory, but i could not find in my target directory.
    when i check message monitoring, it is showing successful.
    Audit Log for Message: af840930-3fa2-11dc-a345-000423c7753d
    Time Stamp Status Description
    2007-07-31 16:14:47 Success Channel CC_sender: Entire file content converted to XML format
    2007-07-31 16:14:47 Success Send text file "xi_input.txt" from FTP server "64.72.230.130:/praba_source", size 353 bytes with QoS EO
    2007-07-31 16:14:47 Success Application attempting to send an XI message asynchronously using connection AFW.
    2007-07-31 16:14:47 Success Trying to put the message into the send queue.
    2007-07-31 16:14:47 Success Message successfully put into the queue.
    2007-07-31 16:14:47 Success The application sent the message asynchronously using connection AFW. Returning to application.
    2007-07-31 16:14:47 Success The message was successfully retrieved from the send queue.
    2007-07-31 16:14:47 Success File "xi_input.txt" deleted after processing
    2007-07-31 16:14:47 Success The message status set to DLNG.
    2007-07-31 16:14:48 Success The message was successfully transmitted to endpoint http://xiserver1:8000/sap/xi/engine?type=entry using connection AFW.
    2007-07-31 16:14:48 Success The message status set to DLVD.
    2007-07-31 16:14:48 Success The message was successfully delivered.
    I followed the Venkat Donela blog
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    IN sender CC, i used file content conversion(mesage protocol), file name scheme xi_input.txt
    In receiver CC , I used file (message protocol),file name scheme xi_output.xml
    In both CC , transport protocol is FTP.
    so i gave server name, port, username, password.
    could you help me out to find the error for this scenario also?
    Thanks in advance

    hi,
    In sender CC
    name and value are like this
    row.fieldNames     FirstName,LastName,MiddleName,City,Place,State,Country
    row.fieldSeperator     ,
    row.processConfiguration     FromConfiguration
    row.endSeperator     'nl'

  • Check if Load Multiple XML file Complete. How ?!

    Hello,
    I want to create loading screen and i want to check if all my XML file ( class10.xml, class11a.xml & class11s.xml ) finish loading go to frame 2. How can i do that ?!
    Regards,

    No there are no core class doing that but it's quite easy to do it sequentially or to create a simple class that does that. That could go something like that:
    1. pass an array of paths to your custom loader class:
    var loader:MultipleLoader = new MultipleLoader(["path1.xml", "path2.xml"])
    loader.addEventListener(Event.COMPLETE, moveOn);
    loader.load();
    Then in your MultipleLoader class you can do:
    public function load():void
         loadNextXML();
    private function loadNextXML(e:Event = null):void
         if(!myxmlarray.length)
              dispatchEvent(e);
              return;
         var path:String = myxmlarray.shift();
         //code to load each xml from the array that was passed and stored in myxmlarray Array
         //you register Event.COMPLETE with loadNextXML method so you can cycle until the array is empty

  • How to check the element  in xml file by xpath

    hi all,
    * How to check the element in xml file by xpath
    for the following XML file,
    * I want to check whether
    the element (sage) is present or not in the following xml file XPATH expression...
    * I have tried by the following expression ,
    NodeList result = (NodeList) xpath.evaluate("//*:student/*:sage/text()",xml_dom,XPathConstants.STRING);
    System.out.println(result.item(0).getLocalName()); * I want to get the Element sage as String value....
    but i am not able to get the element,why that ??? and How to do that ???
    MyXML File :
    <x:student>
    <x:sname>aaa</x:sname>
    <x:sage>26</x:sage>
    </x:student>
    Thanks,
    JavaImran

    <code>* Thanks for reply....
    * </code><code>In </code>
    <code>x:student element x represents the namespace...thats why i put *:student in my expression....
    "//*[local-name() = 'student']/*[local-name() = 'sage']/text()"* By the above code , i am not able to get the sage as string from
    </code> resul.item(0).getLocalName() method.......?
    * How to get that as string format ?

  • Check Writer XML - Check count different between XML and PDF

    Hello all, Check writer XML ends in a warning. Hence the user can't see the output. I go to the server and grab both the .XML and the .PDF files. The PDF file as 93 checks but the actual .XML file has 112 checks. Hence the warning. Did anyone experience the same problem? Any help is highly appreciated.
    Thanks, Naveen G.

    Hi,
    We just figured it out. From SYS Admin> Profile> System, we increased the values of Concurrent: OPP Process Timeout and Concurrent: OPP Response Timeout from 300 to 900. Now Check Writer XML CompleteS without any warnings. I appreciate your response.
    Thank You, Naveen G.

  • Redirect the existing user's call to back office user by cross checking a Txt/Xml file on UCCX Scripting

    I need some help on following scenario.
    I have a customer UCCX 9 and When a new customer calls the contact center via a main number (eg:02089772111) to open an account or register themselves, caller will go through all the necessary welcome message …. And to an agent as normal
    Then the agent collects all the relevant informations (Name, address, tel-number (07929768543), etc) and records it in to a database
    And also the agent finally assign the customer to an internal person (eg: John on extension 3001 (not an agent)) and complete the account registration, like cisco assigning a TAC engineer to a case opener.
    Then the customer calls again to inquire anything in the future ( after opening an account) using the same phone (07929768543) on account and to the main number (eg:02089772111), caller should hear all the greeting, etc…like a first time caller and this time it should go to John on extension 3001 directly rather than to an agent.
    Is this possible with UCCX, can we add a file (xml or text) to script and update it with customer number and back office user extension to perform this diversion by collecting caller number and checking the file and send it to internal person. by updating this file real time by an agent or in a daily or weekly basis by a supervisor by modifying this txt/xml or may be a DataBase file.
    Thanks
    Shameer

    Shameer,
    Your XML file could look something like this:
    <?xml version="1.0" encoding="ISO-8859-1" ?> 
    <Numbers>
    <ANI="07929768200">
         <Ext>2001</Ext>
    </ANI>
    <ANI="02089772144">
         <Ext>2002</Ext>
    </ANI>
    </Numbers>
    You would then have to use the ANI of the caller to loop through the XML file. This would return the extension of the internal resource. They you would just use a call transfer step to connect the two together.
    HTH,
    Adam
    **Please remember to rate helpful posts, for the betterment of the community**
    Edit: fixed XML code. I was unaware that you can't have numbers as element names

  • How to check particluar string in xml data

    Dear oracle Experts.
    Im using the following oracle database.
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    I have a following xml data..
    p_msg_in CLOB :=
    <DATA>
    <FLD FNR="ZZ0584" DTE="26SEP12" SRC="DXB" DES="DAC" />
    <AAA LBP="22334455" ETK="1234567/4" ACT="123" />
    <AAA LBP="223344" ETK="2345678/1" />
    <AAA LBP="223344" ETK="123456/1" ACT="345" />
    </DATA>
    then, im fetching header details like this..
    v_msg_xml := xmltype(p_msg_in);
    FOR i IN multicur(v_msg_xml, '/DATA/FLD') LOOP
    v_1:= i.xml.extract('//@FNR').getstringval();
    v_4:= to_date(i.xml.extract('//@DTE').getstringval(),'DDMONYY');
    v_5:= i.xml.extract('//@SRC').getstringval();
    v_6:= i.xml.extract('//@DES').getstringval();
    END LOOP;
    after this, I need to loop all the actual records one by one using this for loop. Here for each iteration , i need to check some string ( example ACT) is there or not. in the above example, records 1,3 have ACT value in it. So here i need to check some thing like this. if instr('<AAA LBP="223344" ETK="123456/1" ACT="345" />','ACT)>0 before I perform the below step.
    How to achieve this.
    I appreciate your help.
    thank you.
    FOR c IN multicur(v_msg_xml, '/DATA/AAA') LOOP
    v_7 := c.xml.extract('//@LBP').getstringval();
    v_8 := c.xml.extract('//@ETK').getstringval();

    SQL> DECLARE
      2 
      3    p_msg_in  clob := '<DATA>
      4  <FLD FNR="ZZ0584" DTE="26SEP12" SRC="DXB" DES="DAC" />
      5  <AAA LBP="22334455" ETK="1234567/4" ACT="123" />
      6  <AAA LBP="223344" ETK="2345678/1" />
      7  <AAA LBP="223344" ETK="123456/1" ACT="345" />
      8  </DATA>';
      9 
    10    v_msg_xml xmltype;
    11 
    12    v_1       varchar2(30);
    13    v_4       date;
    14    v_5       varchar2(30);
    15    v_6       varchar2(30);
    16    v_7       varchar2(30);
    17    v_8       varchar2(30);
    18 
    19  BEGIN
    20 
    21    v_msg_xml := xmltype(p_msg_in);
    22 
    23    select fnr, to_date(dte, 'DDMONRR'), src, des
    24    into v_1, v_4, v_5, v_6
    25    from xmltable('/DATA/FLD'
    26           passing v_msg_xml
    27           columns fnr  varchar2(30) path '@FNR'
    28                 , dte  varchar2(30) path '@DTE'
    29                 , src  varchar2(30) path '@SRC'
    30                 , des  varchar2(30) path '@DES'
    31         ) ;
    32 
    33     dbms_output.put_line('V1 = '||v_1);
    34     dbms_output.put_line('V4 = '||v_4);
    35     dbms_output.put_line('V5 = '||v_5);
    36     dbms_output.put_line('V6 = '||v_6);
    37 
    38     for r in (
    39       select lbp, etk
    40       from xmltable('/DATA/AAA[@ACT]'
    41              passing v_msg_xml
    42              columns lbp  varchar2(30) path '@LBP'
    43                    , etk  varchar2(30) path '@ETK'
    44            )
    45     )
    46     loop
    47       dbms_output.put_line('LBP = '||r.lbp||' ETK = '||r.etk);
    48     end loop;
    49 
    50  END;
    51  /
    V1 = ZZ0584
    V4 = 26/09/12
    V5 = DXB
    V6 = DAC
    LBP = 22334455 ETK = 1234567/4
    LBP = 223344 ETK = 123456/1
    PL/SQL procedure successfully completed

  • File Content Conversion (.txt to Xml)

    Hi,
    I am new to XI, can any one help me out for file content conversion on the following senario. what should be the
    RecordSet
    RecordStructure
    Parameters
    Sender File: .txt
    sender file
    ========
    1234,IT,Kannan,test,Ramasamy,33/A,test,Bangalore,Karnataka,India,12345,918012345,918012345,+918012345
    Receiver File : XML
    File:
    ===
    <EmployeeDetails>
    <Employee>
        <E_No></E_No>
        <E_Dept></E_Dept>
        <E_Name>
         <First_Name></First_Name>          <Middle_Name></Middle_Name>     <Last_Name></Last_Name>
        </E_Name>
        <E_Address>               <Line1></Line1>               <Line2></Line2>               <City></City>               <State></State>               <Country></Country>               <Pin></Pin>     
         </E_Address>
        <E_Phone>               <Direct></Direct>               <Mobile></Mobile>               <Home></Home>
        </E_Phone>
    </Employee>
    </EmployeeDetails>

    Hi,
    Use the following.
    RecordSet: EmployeeDetails
    RecordStructure: Employee,*
    Employee.fieldNames:E_No,E_Dep and so on
    Employee.fieldSeparator:,
    Refer the bleow link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    chirag

  • SQL (Injection) Vs Flat File TXT Vs XML (XPath Injection) For Database.

    I will have to deal with robust login sessions so I need some advice on what type of database and language I will use.
    PHP and MySQL is the choice but I hear that flat file TXT are more faster so I am thinking about Perl.
    Perl is very flexiple and have many advantages but why do many folks use PHP.
    SQL and XPath injection are becoming more frequent plus MD5 and SH512 have been cracked by some angry folks.
    The Perl community is becoming very small so it will be difficult to receive support if I have a specific problem.

    In our projects we are extracting SMS messages and
    based on the
    MISDN (Telephone number) of each SMS we are fetching
    the corresponding
    account information (server name and password) from
    the database through (connecting through)
    webservice.The data is stored in the DB which you are accessing through a webserivce and that's too slow and unreliable so you are caching the results in a text file...
    That's horrible. The party responsible for the webservice should be fixing it or you should rethink the architecture. All this extra complexity and basically it's just causing problems for you. You'd be better off just accessing the DB directly. I assume this is possible since you know there is a database. In a good SOA architecture, you should not know or care about where the data is persisted.
    This webservice connection is slow/unreliable so a
    local copy of the
    MISDN number and corresponding account information
    are stored/updated in flat files tp prevent repeated
    accessing through webservice.
    My question is-which will be faster for accessing,
    using txt file or xml or a different format.I don't think it's going to matter much at all for the numbers you site, unless you are running this on a 20 year old PC or something.
    But I think you are addressing the wrong problem.

  • Printing check signatures through crystal / xml publisher

    We have our signatures burned into a SIMM on the printer. The signatures get activated by an escape sequence. Is there a way of sending these escape sequences via crystal.
    On another note has anyone printed checks using xml publisher using the aforementioned escape sequences.
    thanks
    Sunder Nagarajan
    New York Medical College

    Thanks Hussein.
    I will check the 2 options you recommended. At the same, I would like to test the direct print from the OS using pdftops utility.  But not sure how can I do that?
    The concurrent request creates the .tmp file under APPLTMP and pass that as the parameter while printing such requests. But if we need to test the .PDF output using pdftops directly, what should be the syntax? Or I would say, what should be the input file and output file?
    e.g.
    pdftops {infile} {outfile}
    I have got the .PDF output under $APPLCSF/$APPLOUT. But from one of the failed request logs, I see the system passes both as .tmp. If we need to test this directly, is there any way?
    In the meantime, I will check the debug logs option and update if it provides any additional information.
    Regards,
    Sunil

  • Import list of file locations in to AME using txt or XML?

    CS5 Adobe Creative Suite on Window 7.
    AME version 5.0.1.0 (64bit)
    Hello, we store many thousands of video files on a NAS. Each file is uniquely identified by a 9 digit barcode which is also the filename. Sometimes we need to batch transcode from these files. I was wondering if there was any facility to provide AME with a txt file or basic XML listing the directory location of the files needed to batch transcode? Currently I will produce a report from our database and export a list of barcodes to a txt file. I then use this txt file in a FOR loop within CMD and use ROBOCOPY to make a new copy of all the files needed in a temp directory which I then import to AME. It would be useful if I could just provide AME with a list of the files I wish to transcode. I have done some research with no luck but not sure what terms would be most useful.
    Thanks in advance for any help you can provide.

    You can set up the Temp folder as a Watch folder in AME.  Then anything you put in that Temp folder will get transcoded.

  • Txt to XML

    I need to convert txt file into xml. There are text formatting tags (like <bold></bold>
    , <italic></italic>). I'm new to Java so I'm not sure if I understand my task in the right way.
    For now I think that to "convert txt file into xml" I should:
    1. create myown special parcer, which methods will find text between special tags in txt
    2. write this parsed text to XML with help of DOM

    Convert Text to XML with Stylus Studio.
    http://stylusstudio.com/text_file_to_xml.html

  • Txt to xml. Problems with characters(&, , ',...)

    I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
    Thank you.

    Use JDOM to generate your XML. It will worry about escaping issues for you.
    Here's a (probably rather inelegant) example for you to play around with:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    public class DateBoom {
         public static void main(String[] args)
              throws Exception
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              String dodgyText = "< & '";
              Document document = builder.newDocument();
              Element root = document.createElement("root");
              root.setAttribute("dodgy",dodgyText);
              document.appendChild(root);
              Element child = document.createElement("child");
              root.appendChild(child);
              child.appendChild(document.createTextNode(dodgyText));
              Transformer transform = TransformerFactory.newInstance().newTransformer();          
              Source source = new DOMSource(document);
              Result result = new StreamResult(System.out);
              transform.transform(source,result);
    }Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

  • Java Bean to check for Well-formed  XML DOC?

    Hi All,
    I am new to the Java XML API's. Does anyone have an example of
    a Java Bean that i can pass an XML String and check if the
    XML document is well formed?
    Thanks
    Joe

    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlString)));try/catch this ugly line, if no parse exception and a non -null doc exists then your XML is well-formed.
    of course if your XML contains namespaces, you would have to setup correctly the document builder.

  • How does Weblogic 7 check for well-formed xmls

    Hello,
    I am having trouble deploying my applications with WLS 7.0. The error I am getting
    is that my web.xml is not well-formed, but I have double-checked everything and
    I think it is correct.
    I have read that weblogic 7.00 does not deploy an application which xmls are not
    well-formed (whereas earlier versions of weblogic would do so).
    My question is: against what dtds does WLS 7 check the web.xml, the weblogic.xml
    , etc.? I would think that it would check it against the dtd in the head of the
    xnl file, i.e., http://java.sun.com/dtd/web-app_2_3.dtd for the web.xml, is this
    correct?
    If this was true, what about intranet applications that are not connected to the
    Internet? could this be the reason?
    TIA Cristina Ceballos

    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlString)));try/catch this ugly line, if no parse exception and a non -null doc exists then your XML is well-formed.
    of course if your XML contains namespaces, you would have to setup correctly the document builder.

Maybe you are looking for

  • My sound is fine but my mic isnt working. how do i fix or figure out whats wrong with it

    Title says it. I just did a clean wipe on my computer and now my mic isnt working on vent or skype, i dont know what is wrong with it.  When i go to my sound hardware it says my external mic, IDT high def audio codec is enabled..

  • Nano will not work

    can not charge battery from either pc or elect outlet i have changed cables the pc will not recognize ipod i did have 'fix it' change the registry the only image i get on ipod is www.apple.com/support/ipod with icon of exclamation point & file

  • Basic crystal report question

    Dear Experts, I just have started to learn CR from PLD and figured out how to generate a simple report like a BP list which does not require selection. In PLD, reports are linked to its own document directly so I do not need to select the document nu

  • How can I add dimensions to adobe illustrator.

    just want to add dimentions for the graphics. like CAD programs and Corel draw.

  • DVD Quality and Screen Image Size Issue

    When I export an iPhoto slide show to a QuickTime movie (.mov), the result is a beautiful, high quality full screen movie, when played on my iMac. When I use that same slide show in iDVD, and burn a DVD, the quality of the slide show is not as sharp