Stripping off XML tags

Hi,
Can someone help me with providing some code on how to strip off the XML tags in an XML file like the following:
<?xml version = '1.0'?>
<!--<?xml-stylesheet type="text/xsl" href="XYZ.xsl"?> -->
<ROWSET>
<ROW num="1">
<PRODUCT_NAME>ABC</PRODUCT_NAME_NAME>
</ROW>
<ROW num="2">
All I want to get back is whatever in between <product_name>. Basically, all the tags with <..> I need to get rid off from this XML file.
Does anybody know if I can use regular expressions in java? That way, would it be easier not to use parsers?
Please provide me ideas, sources, examples, etc.
Thanks in advance.

I worked on the solution, but, it's coming up with a blank list.
Any solution to resolve this!
Here's the code:
public class Test extends JFrame
     JList list;
     JScrollPane listContainer;
     public Test()
          setSize(300, 300);
          setVisible(true);
          setTitle("ProdList");
          initialize();
     // domParse();     // Getting error- how do i call this function?
     public void initialize()
          list = new JList(new DefaultListModel()); // Set the initial model
          listContainer = new JScrollPane(list);
          listContainer.setSize(new Dimension(200, 200));
          getContentPane().setLayout(new BorderLayout());
          getContentPane().add(listContainer, "Center");
          validate(); // Validate the screen
     // public void domParse(String url)
     public void domParse(String url)
          DocumentBuilder parser;
          DocumentBuilderFactory factory =
                    DocumentBuilderFactory.newInstance();
          try {
                    parser = factory.newDocumentBuilder();
                    Document doc = parser.parse(url);
          NodeList product_names = doc.getElementsByTagName("PRODUCT_NAME");
          if(product_names!=null)
          for(int i=0;i<product_names.getLength();++i)
               // get all child nodes of a <product_name> - node
               NodeList product_name_children=product_names.item(i).getChildNodes();
               // and display contents of text nodes
          for(int j=0;j<product_name_children.getLength();++j)
               Node node=product_name_children.item(j);
          //if(node.getNodeType()==Node.TEXT_NODE)
               //System.out.println("element <"+product_names.item(i).getNodeName()+">'s text=["+node.getNodeValue()+"]");
          else
               System.out.println("no element <PRODUCT_NAME> found");
          } catch (Exception e)
          // e.printStackTrace();
          static public void main(String[] args)
               Test x=new Test();
               x.domParse("Test.xml");

Similar Messages

  • JAXP seems to be stripping off DOCTYPE tag

    When I parse a document, the DOCTYPE tag is getting stripped off.
    To parse, I read the document from file and it looks like :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j">
    After parsing, I dump it to the console and it looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <log4j:configuration debug="null" threshold="null" xmlns:log4j="http://jakarta.apache.org/log4j">
    The mystery the output has two attributes set to defaults, the only the parser knows this is by reading the dtd. But why does not include the DOCTYPE tag?
    The parsing code snippet is:
    Document doc = null;
    DocumentBuilderFactory dbFactory = null;
    dbFactory = DocumentBuilderFactory.newInstance();
    dbFactory.setNamespaceAware(true);
    DocumentBuilder db = dbFactory.newDocumentBuilder();
    db.setEntityResolver(new LogDTDResolver());
    doc = db.parse(is);  // is is an InputStreamAnyone have a clue? Is there a property I am missing. I have searched for the complete set of jaxp properties, but I can't find one.
    Thanks for any help.

    So it looks like log4j is doing its own parsing and it requires the DTD. Don't know how (or why) it does that.
    You call the setOutputProperty() method of the Transformer. This is designed to configure the Transformer with properties that are normally set in the <xsl:output> element of an XSL transformation. The properties you need are "doctype-system" and maybe "doctype-public".
    You're quite right, it isn't obvious. That's what happens when systems are designed by architects who believe in abstraction too much.

  • How to turn off XML tag when outputting xml nodes?

    I'm outputting some xml data and each time ColdFusion adds the <?xml version="1.0" encoding="UTF-8"?> tag. Is there any way to turn this off?

    It's difficult to tell what are are doing and how best to remedy it without you giving us at least some idea what your code looks like.
    Adam

  • Stripping Off ?xml version="1.0" ? tag in the final output XML

    Hi All,
    Is there anyway that we can strip off the tag <?xml version="1.0" ?> from the Final XML generated by BPEL.
    I have commented out<?xml version="1.0" ?> in the XSL mapper file but still it is coming in the output file that is generated.
    Any help or pointer is really appreciated.
    Thanks,
    Dibya

    Hi,
    I want to strip it off because I am apppending the same in a Java Program.
    Please let me know how can it be done.
    Appreciate your inputs.
    Thanks,
    Dibya

  • Strip off markups of generic XML data with E4X

    I have a generic XML file:
    <nodes>
    <node1 att1='abc' att2='xyz'>
    <ele1> Hello </ele1>
    <ele2> Hi </ele2>
    </node1>
    </nodes>
    The tag and attribute names above can be anything. I need a
    generic method to strip off the XML markups and display the
    contents as:
    node1@att1: abc
    node1@att2: xyz
    node1.ele1: Hello
    node1.ele2: Hi
    How can E4X do this?

    e4x is for manipulating/navigating your xml. But you can use
    it inside a for/each loop to look at your xml nodes and extract the
    strings without the xml tags using toString().
    Search the help docs for "XML type conversion" and see the
    toString() method in action.

  • XI 2.0 Inbound message to XI has XML Tags Stripped out

    Hi
    We are developing an XI 2.0 application.  A message is sent from a 3rd party company over a VPN and routed to our XI box.
    On receiving the message, XI tries to carry out the message mapping. However it fails because it does not like the content of the message. When I check the message content (View -> Source) we see that all the XML Tags have been stripped out somehow. Only the actual data field contents remain, in a big string. So obviously the mapping fails.
    If I run the same scenario, but send the message from a JMS Test Client on my PC and route it to the XI box everything is fine and the message retains the XML Tags.
    The messages route through the SAP Adapter Engine in XI.
    The 3rd party company say the message does contain the tags when it leaves their systems.
    Has anybody come across this scenario? Would any settings in the SAP Adapter Engine force the XI tags to be stripped? Any suggestions would be very welcome!
    Many Thanks
    Jaime

    Hi Jaime,
    The visual J2EE administrator is the standard administrator tool of any SAP WEBAS system so it is not a specifc XI tool.
    Typically your SAP WEB AS basis administrators use the tool to configure the J2EE part of the SAP WEB AS.
    SAP OSS note 76921 has all the details on tracing the XI adapter framework for version 3.0 - might be usefull for version 2.0 as well ...
    Regards,
    Steven
    BTW - are you that Diagonal bloke with whome I have been on a project for a client in Rozenburg, Netherlands ? I was that SAP BC B2B bloke

  • Strip off the base64 content from an XML and saving the rest in streaming fashion using XML Reader Class.

    Hi,
    I'm presently working in a scenario, where i need to read an XML (having base64 encoded images) using XmlReader class in a streaming fashion (considering the performance) .
    1) I have to strip offs the base64 encoded contents from the xml (front & back image node).
    2) Than saving the remaining XML (without base64 content) . 
    Sample XML:-
    <?xml version="1.0" encoding="utf-8"?>
    <tran>
      <tranheader>
     <feild1></feild1>
      </tranheader>
      <item>
    <fields></fields>
        <image>
          <frontimage>base64_content</frontimage>
          <rearimage>base64_content</rearimage>
        </image>
      </item>
      <item>
        <fields></fields>
        <image>
          <frontimage>base64_content</frontimage>
          <rearimage>base64_content</rearimage>
        </image>
      </item>
      <trantrailer>
        <feild1></feild1>
      </trantrailer>
    </tran>
    Please guide.
    Thanks & Regards

    E.g. a simplified skeleton:
    namespace ConsoleCS
    using System;
    using System.IO;
    using System.Xml;
    using System.Xml.Linq;
    class Program
    static void Main(string[] args)
    XDocument xdocument = XDocument.Parse(@"
    <Items>
    <Item>Test with a child element <more/> stuff</Item>
    <Item>Test with a CDATA section <![CDATA[<456>]]> def</Item>
    <Item>Test with a char entity: &#65;</Item>
    <SkipItem>Item to skip.</SkipItem>
    <!-- Fourteen chars in this element.-->
    <Item>1234567890ABCD</Item>
    </Items>");
    StringReader stringReader = new StringReader(xdocument.ToString());
    XmlReader xmlReader = XmlReader.Create(stringReader);
    xmlReader.MoveToContent();
    while (xmlReader.Read())
    switch (xmlReader.NodeType)
    case XmlNodeType.Element:
    if (xmlReader.Name == "SkipItem")
    Console.WriteLine("Skipping..");
    else
    Console.WriteLine("Pushing to output ({0}).", xmlReader.Name);
    break;
    Console.WriteLine("Done.");
    Console.ReadLine();

  • Conversion of text with xml tags to text without xml tags

    Hi all,
    We have a requirement wherein we have to discard xml tags in a text string.
    The scenario is that we have got the text from the fm READ_TEXT which contains xml tags also.
    we need to populate this text sans the xml tags  into the data segment of a iDOC.
    The text returned by the FM is " <s><<H>INVOICING INSTRUCTIONS:</><s> Invoices referencing a Boyne "
    Helpfull ans will be rewarded
    TIA

    Use the function module:
    SOTR_TAGS_REMOVE_FROM_STRING
    sorry for duplicate post:
    Check this thread:
    Need help getting rid of those <ASX:ABAP> tags from the generated XML file!
    Re: XI 2.0 Inbound message to XI has XML Tags Stripped out
    as well
    Regards,
    ravi

  • IDOC to File, variable substitution on outbound message XML tag attributes

    My scenario is IDOC to FILE using XSL mappings.The target format is 2 XML tags (header, line) with the data stored in the attributes of each tag.
    EG. <header attr1=one attr2=two attr3=three><line attr1=one attr2=two /></header>
    The name of the file is dictated by an outbound attribute value in the header tag.
    Can I get access to it the attribute in the target message in the CC_FILE using variable substution. ?
    Currently I am not using content conversion as the XSL produces the file format needed, so I would pefer not to change the outbound message format/structure as this is going to an external party. I would prefer not to change the outbound format as this would need content conversion to strip the unwanted/information/processing node that is used for this purpose (file naming).
    The name is a calculation of fields in the IDOC and is not explicit dictated (business logic is applied in the mapping to get the file name), so I would prefer to use the attribute of the resulting XML to keep the "business logic" in the XSL..
    Things that cannot be changed.... 1. Must use XSL.for mapping. 2. Format cannot be changed of the outbound message. 3. Would prefer not to involved content conversion to keep formatting/node structure in the XSL mapping.
    I have seen some reference to this being possible on the forums but nothing solid from what Ive read.
    Something like var1 = payload:/Header/@attr1 in variable sub to get at the attribute
    Any comments ?
    Thanks in advance.
    One final piece of info. its on a PI 7.1 system.

    I think its best explained by my other thread Link:PI 7.1 Access to Dynamic Configuration through Java Class .
    Thanks for the link I have already implemented based on that link but the one crucial difference is that it is implemented using a static method with no reference to the actual object (payload) for Dynamic configuration. It seems that without the 7.0 API which isnt available in 7.1 by default XSL with java extentions is limited to static methods. If you could read the other thread it certainly is possible I'm mistaken.

  • Embedding html in xml tags, when rednering text as html

    Quick question,
    I have a site that reads all content from an external xml.
    The text box that reads this info renders the content as html; does
    anyone know how to go about putting an html tag in an xml tag so
    that flash can read it?
    So would it be possible to do:
    <content>
    " Welcome to the site<br>we are happy to have you
    here<br><img src="logo.jpg"> "
    </content>

    I completed deleted the old way, so I have to recreate this
    from scratch...but here is how I used to be able to do it (which,
    looking at how I do it now since HTML wasn't parsing, this was so
    stupid).
    <chair id="1" price_point="High-end">
    <image>&lt;a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&amp;PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'&gt;&lt;img
    src='/images/s/dshe/mini/7/79219.jpg border='0'
    /&gt;&lt;/a&gt;</image>
    <description>&lt;a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&amp;PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'&gt;Toni&lt;/a&gt;</description>
    <brand>Kwalu</brand>
    <composition>Kwalu</composition>
    <leg_style>Chippendale</leg_style>
    <overall_style>Transitional</overall_style>
    </chair>
    And now in 1.1, having that, it prints this on screen:
    <a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&PageID=%7B7A0FB858%2D2184%2D4033%2DB474% 2D2B22D89BBD96%7D'><img
    src='/images/s/dshe/mini/7/79219.jpg border='0' /></a>
    whereas before, it would be that image and it would link to
    the page specified in the href.
    I'm about to take off from work for the night, but I'll check
    back when I get home if you need anything else from me.
    Thanks for your help, Kin. :)
    Kyle

  • Stripping all HTML tags from a CLOB

    Hi all,
    Running Oracle 9.2.0.8 on AIX...
    We have a table which stores HTML document fragments in a clob. I have a requirement to convert these to plain/text (strip all HTML tags) for sending in a plain/text email body.
    I have read the following solution from Tom Kyte's site:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:25695084847068
    Basically creating an Oracle text index on the CLOB column and calling ctx_doc.filter with "plaintext" parameter set to true.
    I noticed in Tom's example, he uses the default filter, which based on the docs, is NULL_FILTER, which applies no filtering. I have tried his example in my dev box, creating the text index on the CLOB column with no parameters.
    The call to ctx_doc.filter did not filter the html at all. I re-created the index and specified the INSO_FILTER and the filtering was done. I was under the impression that INSO_FILTER was for filtering binary content to plaintext...
    create table filter ( query_id number, document clob );
    create table demo
      ( id            int primary key,
        theclob       clob
    create index demo_idx on demo(theClob) indextype is ctxsys.context;
    SET DEFINE OFF;
    Insert into DEMO
       (ID, THECLOB)
    Values
       (1, '<html><body><p>This is a test of <strong>ctx_doc.filter</strong> and plaintext filtering.</p></body></html>');
    COMMIT;
    exec ctx_doc.filter('demo_idx',1, 'filter',1, true);The above code does not convert the html to plaintext...
    Now re-create with the index with INSO_FILTER
    drop index demo_idx;
    create index demo_idx on demo(theClob) indextype is ctxsys.context parameters ('filter ctxsys.inso_filter');
    exec ctx_doc.filter('demo_idx',1, 'filter',1, true);Above scenario returns string "This is a test of ctx_doc.filter and plaintext filtering."
    The ORacle documentation doesn't specify any special filter parameter that needs to be set... just wondering if I'm missing soemthing here... or better yet, if there is a better solution to my problem. ;-)
    Thanks
    Stephane

    The difference between what you did and what Tom Kyte did is that you created your index on a clob column and Tom created his index on a blob column. What I don't know is why that makes a difference. I have demonstrated below with one blob column and one clob column, one index on the blob and one index on the clob, using the same code on both, with different results.
    SCOTT@orcl_11gR2> create table filter
      2    (query_id  number,
      3       document  clob)
      4  /
    Table created.
    SCOTT@orcl_11gR2> create table demo
      2    (id       int primary key,
      3       theblob   blob,
      4       theclob   clob)
      5  /
    Table created.
    SCOTT@orcl_11gR2> create index demo_blob_idx
      2  on demo (theblob)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> create index demo_clob_idx
      2  on demo (theclob)
      3  indextype is ctxsys.context
      4  /
    Index created.
    SCOTT@orcl_11gR2> insert into demo values
      2    (1,
      3       utl_raw.cast_to_raw (
      4         '<html>
      5            <body>
      6              <p>
      7             This is a test of
      8             <strong> ctx_doc.filter </strong>
      9             and plaintext filtering.
    10              </p>
    11            </body>
    12          </html>'),
    13       '<html>
    14          <body>
    15            <p>
    16              This is a test of
    17              <strong> ctx_doc.filter </strong>
    18              and plaintext filtering.
    19            </p>
    20          </body>
    21        </html>')
    22  /
    1 row created.
    SCOTT@orcl_11gR2> exec ctx_doc.filter ('demo_blob_idx', 1, 'filter', 1, true)
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> exec ctx_doc.filter ('demo_clob_idx', 1, 'filter', 2, true)
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select id, utl_raw.cast_to_varchar2 (theblob), theclob from demo
      2  /
            ID
    UTL_RAW.CAST_TO_VARCHAR2(THEBLOB)
    THECLOB
             1
    <html>
            <body>
              <p>
                This is a test of
                <strong> ctx_doc.filter </strong>
                and plaintext filtering.
              </p>
            </body>
          </html>
    <html>
          <body>
            <p>
              This is a test of
              <strong> ctx_doc.filter </strong>
              and plaintext filtering.
            </p>
          </body>
        </html>
    1 row selected.
    SCOTT@orcl_11gR2> select query_id, document from filter
      2  /
      QUERY_ID
    DOCUMENT
             1
    This is a test of ctx_doc.filter and plaintext filtering.
             2
    <html>
          <body>
            <p>
              This is a test of
              <strong> ctx_doc.filter </strong>
              and plaintext filtering.
            </p>
          </body>
        </html>
    2 rows selected.
    SCOTT@orcl_11gR2>

  • Upload to Mobile Me strips off EXIF information?

    If I plug in the iPhone, import the pictures I've taken into my iPhoto Library, upload them to a MobileMe Web Gallery, and look at their EXIF information (using the "i" button in a slidehow), all the GPS information and other tags are on there.
    If I choose a photo on the iPhone itself and send it to mobile me, it arrives there with no GPS information and other tags are missing. Why? How in the heck can we do mobile geotagging if the system is stripping off all the GPS information?

    Go to the System/MobileMe preference pane, log out, log in with a bogus name and password (this clears the name and password cache) and log in with the correct MMe account name and password. Then try again.

  • Can't use HTML in XML tags anymore?

    I've noticed with 1.1 that HTML that worked in an XML tag in
    1.0 no longer displays. Spry seems to be taking what is in the tags
    as a literal string. For the most part, I've been able to work
    around this, however, I'm running into some issues now where there
    are tags that are empty because a certain product just has nothing
    to go in that tag. When that happens, it is being displayed on the
    page as:
    <td></td> and the style I'm calling on all
    <td>'s (a bottom border) doesn't show since there is nothing
    in the tag at all. I tried just putting a space, but white space
    (when there is nothing but whitespace) is ignored and putting
      results in the XML not loading correctly. &amp;nbsp;
    results in " " showing up in that <td> whereas in
    1.0, it would've been a non-breaking space.
    I guess what I'm asking is if there is a way to still get
    HTML to display correctly or if there is some sort of workaround
    for cells that end up being blank?

    I completed deleted the old way, so I have to recreate this
    from scratch...but here is how I used to be able to do it (which,
    looking at how I do it now since HTML wasn't parsing, this was so
    stupid).
    <chair id="1" price_point="High-end">
    <image>&lt;a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&amp;PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'&gt;&lt;img
    src='/images/s/dshe/mini/7/79219.jpg border='0'
    /&gt;&lt;/a&gt;</image>
    <description>&lt;a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&amp;PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'&gt;Toni&lt;/a&gt;</description>
    <brand>Kwalu</brand>
    <composition>Kwalu</composition>
    <leg_style>Chippendale</leg_style>
    <overall_style>Transitional</overall_style>
    </chair>
    And now in 1.1, having that, it prints this on screen:
    <a
    href='/dsn/catalog/viewproductpage.asp?OwnerID=1&PageID=%7B7A0FB858%2D2184%2D4033%2DB474% 2D2B22D89BBD96%7D'><img
    src='/images/s/dshe/mini/7/79219.jpg border='0' /></a>
    whereas before, it would be that image and it would link to
    the page specified in the href.
    I'm about to take off from work for the night, but I'll check
    back when I get home if you need anything else from me.
    Thanks for your help, Kin. :)
    Kyle

  • Form or form on report to update XML tagS stored in CLOB field.

    I would like to create a form or a form on a report
    where i can update xml tags. The xml data is stored in a CLOB field.
    sample CLOB DATA
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE preferences SYSTEM 'http://java.sun.com/dtd/preferences.dtd'>
    <preferences EXTERNAL_XML_VERSION="1.0">
    <root type="user">
    <map />
    <node name="com">
    <map />
    <node name="mynode">
    <map />
    <node name="utils">
    <map />
    <node name="properties">
    <map>
    <entry key="Save" value="ON" />
    <entry key="TM_PORT" value="55555" />
    <entry key="TM_PORT2" value="7777" />
    <entry key="SubID" value="all" />
    <entry key="UserDBUsr" value="myuser" />
    <entry key="JMS_JDBC" value="OFF" />
    <entry key="Side" value="BUY" />
    <entry key="HEALTH_MONITOR_CRITICAL_DISK_SPACE" value="500" />
    <entry key="HEALTH_MONITOR_WARNING_DISK_SPACE" value="750" />
    <entry key="HEALTH_MONITOR_PERIOD" value="600000" />
    </map>
    </node>
    </node>
    </node>
    </node>
    </root>
    </preferences>
    the goal is to have a form where i can view and update the "value" of following:
    TM_PORT
    TM_PORT2
    SubID
    UserDBUsr
    JMS_JDBC
    Side
    HEALTH_MONITOR_CRITICAL_DISK_SPACE
    HEALTH_MONITOR_WARNING_DISK_SPACE
    HEALTH_MONITOR_PERIOD
    I have searched around this forum but could not find an example.
    it would be cool if I could also load the an xml file into the clob.
    Thank you.

    Hi,
    I think you just study first the topics about XML DB to understand how to manupulate xml data in the database.
    See:
    http://www.oracle.com/technology/tech/xml/xmldb/index.html
    and
    XML DB
    Regards,
    Cafer

  • Oracle code+simple XML tags

    Hi ,
    I wrote a shell script which contains " Oracle SQL query + simple XML tags".
    the code was executing successfully.But My problem is to create a document based on the code.Don't mind any one please help me to preparingn the document..
    Can I post the code here?? Is it right place to post my code.? Because I am new member to this forum..Please let me know...
    I'll post the code as per ur suggestion..
    Thank you..

    dbuser=SCOTT/TIGER
    dbname=PRODDB
    connect_string=$dbuser@$dbname
    tableowner="DEVPS"
    TABLEOWNER=$(echo $tableowner | tr '[a-z]' '[A-Z]')
    #. ${MMHOME}/rfx/etc/config.env
    OUT_DIR=/ifiles/inbox/data
    # Set it to number of CPU on the server
    MAX_THREAD=12
    TASK_RUNNING=0
    PROGRAM_NAME='Out_Source'
    get_partname()
      sqlplus -s $connect_string <<!
      set pages 0
      set feedback off
      set heading off
      SELECT PARTITION_NAME, PARTITION_POSITION
          FROM  DBA_TAB_PARTITIONS
           WHERE TABLE_NAME='EMP'
          ORDER BY PARTITION_POSITION;
      exit;
    create_part_flow()
    cat > dats/outFlow_${PROGRAM_NAME}_$1.xml - <<EOF1
    export PROGRAM_NAME="item_sale_$1"
    . \${MMHOME}/config.env
    . \${LIB_DIR}/lib.ksh
    message "Program started ..."
    \${ITEM_EXE} \${ITEM_OPTIONS} << EOF
    <FLOW name="output.flow">
      \${DBREAD}
        <PROPERTY name="query">
          <![CDATA[
    SELECT <stmt>
          ]]>
        </PROPERTY>
        <OPERATOR type="convert">
             <PROPERTY name="convertspec">
                <![CDATA[
                   <CONVERTSPECS>
                      <CONVERT destfield="EMP_SAL" sourcefield="EMP_SAL" newtype="int16">
                         <CONVERTFUNCTION name="int16_from_dfloat"/>
                         <TYPEPROPERTY name="nullable" value="false"/>
                      </CONVERT>
                   </CONVERTSPECS>
                ]]>
             </PROPERTY>
             <OUTPUT name="tmp.v"/>
       </OPERATOR>
       </OPERATOR>
       <OPERATOR type="export">
        <INPUT name="tmp.v"/>
        <PROPERTY name="outputfile" value="\${DATA_DIR}/sao0_irt_i_$1.dat"/>
        <PROPERTY name="schemafile" value="\${SCHEMA_DIR}/item_on_off.schema"/>
      </OPERATOR>
    </FLOW>
    EOF
    checkerror -e $? -m "Program failed - check \${ERR_FILE}"
    # Remove the status file
    if [[ -f \${STATUS_FILE} ]]; then rm \${STATUS_FILE}; fi
    message "Program completed successfully"
    # cleanup and exit
    rmse_terminate 0
    EOF1
    create_nopart_flow()
    cat > outFlow_${PROGRAM_NAME}.xml - <<EOF
    <FLOW name="output.flow">
      <OPERATOR type="oraread">
        <PROPERTY name="query">
          <![CDATA[
               <![CDATA[
    SELECT <STmt>
         ]]>
        </PROPERTY>
        <OUTPUT name="tmp.v"/>
      </OPERATOR>
      <OPERATOR type="export">
        <INPUT name="tmp.v"/>
        <PROPERTY name="outputfile" value="sao0_irt_i_$1.dat"/>
      </OPERATOR>
    </FLOW>
    EOF
    create_full_flow()
    cat > dats/item_sale.xml << EOF1
    export PROGRAM_NAME="item_sale"
    . \${MMHOME}/config.env
    . \${LIB_DIR}/lib.ksh
    ON_SALE_OUTPUT_FILE=\${DATA_DIR}/smo0_onseffdt_.txt
    ON_SALE_OUTPUT_SCHEMA=\${SCHEMA_DIR}/item_on_sale.schema
    OFF_SALE_OUTPUT_FILE=\${DATA_DIR}/sm0_ofseffdt_.txt
    OFF_SALE_OUTPUT_SCHEMA=\${SCHEMA_DIR}/item_off_sale.schema
    #export RFX_DEBUG=1
    # input files:
    ONOFF_DATE=\${DATA_DIR}/dm0_onseffdt_ofseffdt.dat
    ONOFF_DATE_SCHEMA=\${SCHEMA_DIR}/item_on_off.schema
    message "Program started ..."
    \${RETL_EXE} \${RETL_OPTIONS} << EOF
    <FLOW name="Store_Source.flw">
       <OPERATOR  type="import">
          <PROPERTY  name="inputfile" value="\${ONOFF_DATE}"/>
          <PROPERTY  name="schemafile" value="\${ONOFF_DATE_SCHEMA}"/>
           <OPERATOR type="copy">
             <OUTPUT name="on_off_sale.v"/>
           </OPERATOR>
       </OPERATOR>
    <!--START_INS_C2.1-->
       <OPERATOR type="copy">
          <INPUT  name="on_off_sale.v"/>
          <OUTPUT name="on_sale_out.v"/>
          <OUTPUT name="off_sale_out.v"/>
       </OPERATOR>
    <!--END_INS_C2.1-->
       <OPERATOR type="fieldmod">
          <INPUT name="on_sale_out.v"/>
    <!--START_DIS_C2.1
          <PROPERTY name="rename" value="ON_SALE_EFFECTIVE_DATE=STATUS_UPDATE_DATE"/>
    END_DIS_C2.1-->
    <!--START_INS_C2.1-->
          <PROPERTY name="rename" value="ON_SALE_EFFECTIVE_DATE=ONSALE_DATE"/>
    <!--END_INS_C2.1-->
          <OPERATOR type="export">
             <PROPERTY name="outputfile" value="\${ON_SALE_OUTPUT_FILE}"/>
             <PROPERTY name="schemafile" value="\${ON_SALE_OUTPUT_SCHEMA}"/>
          </OPERATOR>
       </OPERATOR>
       <OPERATOR type="fieldmod">
          <INPUT    name="off_sale_out.v"/>
    <!--START_DIS_C2.1
          <PROPERTY name="rename" value="OFF_SALE_EFFECTIVE_DATE=STATUS_UPDATE_DATE"/>
    END_DIS_C2.1-->
    <!--START_INS_C2.1-->
          <PROPERTY name="rename" value="OFF_SALE_EFFECTIVE_DATE=OFFSALE_DATE"/>
    <!--END_INS_C2.1-->
          <OPERATOR type="export">
             <PROPERTY name="outputfile" value="\${OFF_SALE_OUTPUT_FILE}"/>
             <PROPERTY name="schemafile" value="\${OFF_SALE_OUTPUT_SCHEMA}"/>
          </OPERATOR>
       </OPERATOR>
    </FLOW>
    EOF
    checkerror -e 0 -m "Program failed - check ${ERR_FILE}"
    # Remove the status file
    if [[ -f \${STATUS_FILE} ]]; then rm \${STATUS_FILE}; fi
    message "Program completed successfully"
    # cleanup and exit
    rmse_terminate 0
    EOF1
    # Remove all individual xml files
    rm outFlow_${PROGRAM_NAME}*.xml
    NO_OF_PART=`get_partname $TABLEOWNER |wc -l`
    if [ ${NO_OF_PART} -eq 0 ]; then
      echo Table not partitioned
      create_nopart_flow
      time retl -c ${1} -f outFlow_${PROGRAM_NAME}.xml
    else
      echo Table partitioned
      get_partname $TABLEOWNER |while read PARTNAME THREAD_SEQ
      do
         echo PartName: $PARTNAME   POS: $THREAD_SEQ
         create_part_flow $THREAD_SEQ  ${PARTNAME}
         time /app/rms/scripts/rms_retl_aip.sh outFlow_${PROGRAM_NAME}_${THREAD_SEQ}.xml&
         echo Running outFlow_${PROGRAM_NAME}_${THREAD_SEQ}.xml ....
         sleep 1
         #TASKS_RUNNING=`ps -ef|grep retl|grep -v java|grep -v grep|wc -l`
         TASKS_RUNNING=`ps -ef |grep ${PROGRAM_NAME} |grep -v java|grep -v grep |wc -l`
        echo Running: ${TASKS_RUNNING} Max: ${MAX_THREAD}
         while [ "${TASKS_RUNNING}" -ge "${MAX_THREAD}" ]; do
            sleep 2
            TASKS_RUNNING=`ps -ef |grep ${PROGRAM_NAME} |grep -v java|grep -v grep |wc -l`
         done
      done
      wait
      #Concatenate all files
      cat ${OUT_DIR}/dm0_src_i_*.dat > ${OUT_DIR}/sm0_onseffdt_ofseffdt.dat
      if [ $? -eq 0 ]; then
         rm  ${OUT_DIR}/sm0_src_i_*.dat
      fi
      create_full_flow
      time dats/item.sh item_sale.xml
    fi

Maybe you are looking for

  • My New computer doesn't recognize my ipod nano

    my old computer crashed. i now have a new laptop. i have installed my iPod software and the latest iTunes. i can go into iTunes, access the music store, and everything else... but when i plug up my iPod, it doesnt pop up in the source menu in iTunes.

  • No VGA output ios7

    Hi, Since upgrading to ios7 on my iPad v3,  I lost my VGA output.  Anyone else had the same problem?  Is this a glitch or a dropped feature in ios7? Thanks, Dwight

  • Performance issue when inserting into spatial indexed table with JDBC

    We have a table named 'feature' which has a "sdo_geometry" column, and we created spatial index on that column, CREATE TABLE feature ( id number, desc varchar, oshape sdo_gemotry) CREATE INDEX feature_sp_idx ON feature(oshape) INDEXTYPE IS MDSYS.SPAT

  • Plugin-container.exe

    Since this morning, plug-in container.exe has not started (yay!), and I'm not having any problems at all. Web navigation has been fast and sweet, and for the first time in YEARS my Firefox memory usage has remained in the 74,000-78,000 range, no wild

  • How can I remove the Friendbar Toolbar?

    I installed the Friendbar toolbar, now I want it to go away because it is not working how I thought it would. Please help! Thank you.