Remove un-necessary tags?

Jdbc to file scenario, in this scenario we need to remove empty value tags from sender or receiver side before creating Xml document in third party.
Is that possible? I know this is very dummy question but I am new in pi and sdn
Ex:
<test>
<empdetails>
<emp-no>12</emp-no>
<emp-name></emp-name >
<emp-salary>120000</emp-salary >
<empid></empid>
</ empdetails>
<empdetails>
<emp-no>13</emp-no>
<emp-name>xsd</emp-name >
<emp-salary></emp-salary >
<empid>rt54</empid>
</ empdetails>
</test>
any bisy give solution for this querry.
Edited by: santhooshv on Dec 20, 2011 7:43 AM
Edited by: santhooshv on Dec 20, 2011 7:45 AM

hi,
<test>
<empdetails>
<emp-no>12</emp-no>
<emp-name></emp-name >
<emp-salary>120000</emp-salary >
<empid></empid>
</ empdetails>
<empdetails>
<emp-no>13</emp-no>
<emp-name>xsd</emp-name >
<emp-salary></emp-salary >
<empid>rt54</empid>
</ empdetails>
</test>
As per My knowledge, That is possible with remove the empty tags of the Additional Parameters in u201CAdvanced Modeu201D in Sender Jdbc Communication channel.
If you want to remove the empty tags from the test of the sender adapter, select Remove Empty Tags. Main advantage is  reduce the size of XML documents.
<test>
<empdetails>
<emp-no>12</emp-no>
<emp-salary>120000</emp-salary >
</ empdetails>
<empdetails>
<emp-no>13</emp-no>
<emp-name>xsd</emp-name >
<empid>rt54</empid>
</ empdetails>
</test>
please gothrough below link:
http://help.sap.com/saphelp_nw73/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
thanks,

Similar Messages

  • Regex - Remove specific HTML Tags

    I have already found a solution in the forum to remove all html tags but I need some specific tags - img, a, b, i, u - and also their closing tags - </a>, </b>.
    The regex also needs to differ between img without the class attribute and with class attribute - it should remove elements with class attribute
    So I have tried to modifiy the found solution:
    result = Regex.Replace(result, "<[^(img|a|b|i|u)][^>]*>", " ");
    It works not optimal because it also removes the closing tags, doesn't differ and doesn't remove the br tags. It's not necessary to do all these actions in one statement.

    you can use regular
    <[(/body|html)\s]*>
    in c#:
    var result = Regex.Replace(html, @"<[(/body|html)\s]*>", "");
    <html>
    <body>
    < / html>
    < / body>

  • Remove Empty XML Tags using module parameters

    Hi All,
    In my lanscape I have two PI Systems.
    My scenario is an IDOC reaches 1st PI system gets converted into an EDIFACT and then goes to the 2nd PI and from there it gets routed to the respective AS2 Party.
    I am using SOAP to pass message between the PI systems and B2B Toolkit's AS2 Adapter for the communication with AS2 party.
    The issue is when the message is getting converted from IDOC to EDIFACT there are a few feilds with occurence 1..1 and due to these fields i get an empty XML tag at the output. These empty XML tags give me an error in the B2B Toolkit's AS2 Adapter Receiver Channel
    I cannot change the occurence in the structure of the EDIFACT nor can I use an XSLT mapping to remove empty tags before the message reaches the Communication Channel.
    I want to know if there are any module parameters which i can use either in SOAP Channel or the AS2 Channel to remove the XML Tags.

    Hi Muni,
    "1..1 means, you must send some values for that fields. try to find out why these are not getting any values."
    This empty tag is expected. Before using B2B Toolkit's AS2 Adapter we used to use Seeburger's AS2 Adpater and the message used to get executed successfully with these empty tags.The issue is coming only when we are using B2B Toolkit's AS2 Adapter.
    "if you want to stop sending(the fields which are not needed in target) you can you can disable the fields in the message mapping."
    I cannot disable the feild in the mapping as some other message may use this field.
    Thanks,
    Farhaan

  • Removing message type tag in output file

    Hi guys,
    I'm new to XI. I have done an xml file to xml file scenario. It is working successfully
    The output file has a format
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:mt_xml_receiver xmlns:ns0="http://xml2xml">
         <DETAILS>
              <ID>111</ID>
              <NAME>Varun</NAME>
              <LOCATION>India</LOCATION>
              <ADD>Bangalore</ADD>
              <MOBILE>46572727</MOBILE>
              <EMAIL>[email protected]</EMAIL>
         </DETAILS>
    </ns0:mt_xml_receiver>
    I want to remove the additional tag present for the message type and i want the output in the format
    <?xml version="1.0" encoding="UTF-8"?>
         <DETAILS>
              <ID>111</ID>
              <NAME>Varun</NAME>
              <LOCATION>India</LOCATION>
              <ADD>Bangalore</ADD>
              <MOBILE>46572727</MOBILE>
              <EMAIL>[email protected]</EMAIL>
         </DETAILS>
    Can any one help me on how to achieve this???
    Pl help me on this guys
    Regards
    Varun

    HI Varun,
    This will help you..
    In the message type <b>mt_xml_receive</b>r there is a box where the namespace name is specified.
    Simply delete the same and activate the message type.
    In your case what you can do is as you dont want the message type name also.
    you can create the message type name as DETAILS instead of mt_xml_receiver.
    Regards,
    Sumit
    ps : reward points if tht helped u.

  • How to remove the header tag in the XML data ?

    Hi All,
    I am sending an XML data from SFTP to Proxy, in that I want to remove the header tag (first tag) from the xml, while loading the data. how to do that ?

    Hi,
          It is not about the thing that, whether your source is XML or flat file. If you dont want some thing in your source file , dont consider it and dont map it with your target structure. think that, your not getting the header in your source.  What is the header here.
    <Emp_details>
    <Emp_Id> Employee No </Emp_Id>
    <Emp_Name> Employee Name </Emp_Name>
    </Emp_details>
    <Emp_details>
    <Emp_Id> 1234 </Emp_Id>
    <Emp_Name> xxxx </Emp_Name>
    </Emp_details>
    <Emp_details>
    <Emp_Id> 5678 </Emp_Id>
    <Emp_Name> yyy </Emp_Name>
    </Emp_details>
    you have two fields under node Emp_details. What do u want to avoid here?
    Regards,
    Reyaz

  • Remove the unnecessary tags in XML using PL/SQL

    Hi Friends
    from the below XML, its generate by a complex SQL query, Now we need to remove all the object type tags, and all the empty tags.
    Version - PL/SQL Release 11.2.0.3.0 - Production
    <MajorLine>
        <MAJOR_LINE_OBJECT_TYPE> -- Need to remove these Objects types showing in the XML
            <LINEID>143424538</LINEID>
            <ITEMNAME>TC-ABC-123</ITEMNAME>
            <ITEMPATH>78245</ITEMPATH>
            <QUANTITY>10</QUANTITY>
            <SERVICELINE/> -- Need to remove all the Empty tags
            <MINORLINE>
                <MINOR_LINE_OBJECT_TYPE> -- Need to remove these Objects types showing in the XML
                    <LINEID>143424799</LINEID>
                    <ITEMNAME>TCC-abc</ITEMNAME>
                    <ITEMPATH>78245</ITEMPATH>
                    <QUANTITY>10</QUANTITY>
                    <SERVICELINE/>-- Need to remove all the Empty tags
                    <MINOR_MINOR_LINES>
                        <M_MINOR_LINE_TYPE> -- Need to remove these Objects types showing in the XML
                            <LINEID>143424798</LINEID>
                            <ITEMNAME>SF15-abc-xyz</ITEMNAME>
                            <ITEMPATH>78245</ITEMPATH>
                            <QUANTITY>10</QUANTITY>
                      </M_MINOR_LINE_TYPE>-- Need to remove these Objects types showing in the XML
                    </MINOR_MINOR_LINES>
                </MINOR_LINE_OBJECT_TYPE>--Need to remove these Objects types showing in the XML
            </MINORLINE>
        </MAJOR_LINE_OBJECT_TYPE>-- Need to remove these Objects types showing in the XML
    </MajorLine>
    i tried one of the queries posted in this blog ,PFB  to remove the empty tags , but it didnt work for me unfortunately. Please help.
    PFB
    WITH sample_data AS (
      SELECT xmltype('<MajorLine>
        <MAJOR_LINE_OBJECT_TYPE>
            <LINEID>143424538</LINEID>
            <ITEMNAME>hijk</ITEMNAME>
            <ITEMPATH>78245</ITEMPATH>
            <QUANTITY>10</QUANTITY>
            <SERVICELINE/>
            <MINORLINE>
                <MINOR_LINE_OBJECT_TYPE>
                    <LINEID>143424799</LINEID>
                    <ITEMNAME>efg</ITEMNAME>
                    <ITEMPATH>78245</ITEMPATH>
                    <QUANTITY>10</QUANTITY>
                    <SERVICELINE/>
                    <MINOR_MINOR_LINES>
                        <M_MINOR_LINE_TYPE>
                            <LINEID>143424798</LINEID>
                            <ITEMNAME>abc</ITEMNAME>
                            <ITEMPATH>78245</ITEMPATH>
                            <QUANTITY>10</QUANTITY>
                        </M_MINOR_LINE_TYPE>
                    </MINOR_MINOR_LINES>
                </MINOR_LINE_OBJECT_TYPE>
            </MINORLINE>
        </MAJOR_LINE_OBJECT_TYPE>
    </MajorLine>') xmldoc
      FROM dual
    SELECT deleteXML( t.xmldoc
                    , '/MajorLine/*[.="" or contains(.,"?")]'
                    ) as result
    FROM sample_data t
    My email ID is [email protected] -- You can reach me
    thanks in advance ... Arun thomas T

    Hey Odie. Great to see you again, the query is
    SELECT XMLELEMENT (
              "MajorLine",
              major_line_object_type (
    oola_major.line_id,
    oola_major.ordered_item,
    oola_major.header_id,
    oola_major.ordered_quantity,
                 CAST (
                    MULTISET (
                       SELECT oola_ser.line_id,
    oola_ser.ordered_item,
    --oola_ser.header_id,
    oola_ser.ordered_quantity,
    CAST (
                                 MULTISET (
    SELECT oola_ser2.service_start_date,
    oola_ser2.service_end_date,
    oola_ser2.service_duration
                                      FROM oe_order_lines_all oola_ser2
                                     WHERE oola_major.line_id =
    oola_ser2.service_reference_line_id
                                           AND oola_ser2.header_id =
    oola_major.header_id) AS service_period_table_type)
    FROM oe_order_lines_all oola_ser
                        WHERE oola_major.line_id =
                                 oola_ser.service_reference_line_id
    AND oola_ser.header_id = oola_major.header_id) --As of now excluding cross order service line
    AS SERVICE_TABLE_TYPE),
                 CAST (
                    MULTISET (
                       SELECT oola_minor.line_id,
    oola_minor.ordered_item,
    oola_minor.header_id,
    oola_minor.ordered_quantity,
    CAST (
                                 MULTISET (
                                    SELECT oola_ser1.line_id,
    oola_ser1.ordered_item,
                                           -- oola_ser1.header_id,
    oola_ser1.ordered_quantity,
                                           CAST (
                                              MULTISET (
                                                 SELECT oola_ser3.
    service_start_date,
    oola_ser3.
    service_end_date,
    oola_ser3.
    service_duration
                                                   FROM oe_order_lines_all oola_ser3
                                                  WHERE oola_minor.line_id =
    oola_ser3.
    service_reference_line_id
    AND oola_ser3.header_id =
    oola_major.
    header_id) AS service_period_table_type)
                                      FROM oe_order_lines_all oola_ser1
                                     WHERE oola_minor.line_id =
    oola_ser1.service_reference_line_id
                                           AND oola_ser1.header_id =
    oola_major.header_id) --As of now excluding cross order service line
    AS SERVICE_TABLE_TYPE),
    CAST (
                                 MULTISET (
                                    SELECT oola_minor_m.line_id,
    oola_minor_m.ordered_item,
                                           oola_minor_m.header_id,
    oola_minor_m.ordered_quantity
                                      FROM oe_order_lines_all oola_minor_m
                                     WHERE oola_minor.line_id =
                                              oola_minor_m.link_to_line_id
                                           AND oola_minor_m.header_id =
    oola_major.header_id) --As of now excluding cross order service line
                                                                       AS m_minor_line_table_type)
    FROM oe_order_lines_all oola_minor
                        WHERE    --oola_minor.top_model_line_id=oola_major.line_id
    oola_minor.link_to_line_id = oola_major.line_id
    AND oola_minor.header_id = oola_major.header_id
    AND oola_minor.item_type_code != 'SERVICE') AS MINOR_LINE_TABLE_TYPE)))
              AS "XMLOutput"
      FROM oe_order_lines_all oola_major
    WHERE oola_major.line_id = 143424538 AND oola_major.link_to_line_id IS NULL;
    can we rewirte it to get the desired out put ..
    Desired output is Just remove the Object_type tags and empty tags coming in the output xml.
    The previous issues i mentioned are not solved yet  . actually will update the challenges ..
    Odie .. thanks.. again

  • How to REMOVE [b] H1 Tag[/b] from HTML without changing other Tags?

    Hi there!
    I'm searching for a method to remove Tags from HTML (using HTMLEditorKit, HTMLDocument ...).
    My current code is as follows:
    // first get the whole paragraph
       int iCaretPos = tpMyTextPane.getCaretPosition();
       Object oAttrib;
       HTMLDocument.BlockElement oElem = (HTMLDocument.BlockElement)oMyDocument.getParagraphElement(iCaretPos);
       AttributeSet oAttribs;
       SimpleAttributeSet oNewAttribs;
       int iParaStart = oElem.getStartOffset();
       int iParaEnd = oElem.getEndOffset();
       tpMyTextPane.select(iParaStart, iParaEnd);
       // the following only fetches the Tags that are valid for the whole paragraph!!!!!
       oAttribs = tpMyTextPane.getCharacterAttributes();
       oNewAttribs = new SimpleAttributeSet(oAttribs);
       if(iParaEnd - iParaStart > 0)
          // now analyse the attributes (remove all paragraph-tags)
          for(int iIndex = 0; iIndex < oaOurFormatTags.length; iIndex++)
             oNewAttribs.removeAttribute(oaOurFormatTags[iIndex]);
          if(iParaEnd - iParaStart > 0)
             oMyDocument.setCharacterAttributes(iParaStart, iParaEnd - iParaStart, oNewAttribs, true);
             tpMyTextPane.setCaretPosition(iCaretPos);
          tpMyTextPane.requestFocus();
          tpMyTextPane.repaint();
       }This code works for me, but all Tags of the selected paragraph are removed. That means:
    <P><H1>This is a <B>test</B> text<H2></P>
    will be converted to:
    <P>This is a test text</P>
    but I want it to be converted to:
    <P>This is a <B>test</B> text</P>
    Is there any other method to remove specific Tags (<H1>, ... <H6>) without touching other tags????

    In February I wrote a feature request about this. Today it has been accepted to the bug database. Please make your vote:
    http://developer.java.sun.com/developer/bugParade/bugs/4760082.html

  • How remove an XML tag and its childs?

    Hi all,
    I'm a newbie with XML library. I would like to remove a specific tag and all its childs from an XML document.
    I've modified an example VI  but Error -2607 is generated (see attachment).
    Thanks in advance
    Attachments:
    xmlTest.jpg ‏167 KB

    Post your code and not a picture about it.

  • [svn:fx-] 21427: Removed flex/sdk/tags/trunk4.5.1 - history not maintained!

    Revision: 21427
    Revision: 21427
    Author:   [email protected]
    Date:     2011-06-21 07:16:13 -0700 (Tue, 21 Jun 2011)
    Log Message:
    Removed flex/sdk/tags/trunk4.5.1 - history not maintained!
    Removed Paths:
        flex/sdk/tags/trunk4.5.1/

  • How do I remove the acronym tags from menu items in Business Catalyst?

    Hello, can anybody answer this for me please? Not having any success googling or foruming it so far.
    How do I remove the acronym tags from menu items in Business Catalyst? 
    Thanks in advance
    Grant

    These are titles and in the dynamic menu will be the item description per item.
    These are actually important though and you do not really want to remove them but make them better and reword them other then the same as the link test. These are good for the user experience as well as SEO. A bot knowing a description of a link and where it is going coupled with the URL's and the title of an anchor are all important aspects of your sites SEO.

  • Remove the bilingual "tag"

    How do I remove the bilingual "tag" that appears at the bottom of every email I send? Thanks!
    Solved!
    Go to Solution.

    Here you go:
    Thanks,
    Bifocals
    http://bis.na.blackberry.com/html?brand=bell
    Click Accept as Solution for posts that have solved your issue(s)!
    Be sure to click Like! for those who have helped you.
    Install BlackBerry Protect it's a free application designed to help find your lost BlackBerry smartphone, and keep the information on it secure.

  • Query Stripping removes used necessary measures

    Hi experts,
    I'm on BOE XI 3.1 sp3 (no fixpack). I'm using Query Stripping for some webi documents based on BEx query.
    I'm facing the following issue with one of the document:
    I have two measure (let say A and B) that are in my microcube (in result objects). Measure A and B are not directly used in layout of the document, but they are used in a variable C (also of type measure) that is calculated as A/B.
    C is used in layout of the report.
    When enabling query stripping I get error for cells of measure C. Switching in edit mode I can see that measure A and B are highlighted so they have been Stripped off, even if they would be necessary for calculation.
    Replacing variable C with the formula A/B, report works fine again.
    Does it mean that query stripping is not able to recognize if mesure are used in necessary variable? It is a known limitation or there is any fix to apply?
    Thanks and regards.
    Roberto.

    Hi Ingo, sorry for the late reply.
    I discussed with my customers, but actually they don't seem to like the idea to open a support case:
    I'm working as a consultant for a BI department but only central IT department can open the support case.
    BI department asked me to not raise the issue as actually manually removing not necessary dimensions is an acceptable workaround.
    BI department doesn't like the idea to apply a fixpack just after to be involved in a SP upgrade. I think they look at me as the one that raise always new issues, but it is because BW-BO integration is pretty new respect to other areas as relational universes.
    I'm really sorry about that because you are interested to the issue and I always appreciate the effort you are making to improve BW-BO integration.
    P.S. I checked  other reports with similar structure and they don't seem to be affected. I'll do some more checks to see if there are other explenations to the issue coming only in this report and let you know.
    Kind regards.
    Roberto.
    Edited by: Roberto G. on Feb 17, 2011 9:42 AM

  • Removing the [Spam] tag from non Spam emails

    I have a few emails which come through to my Inbox with [Spam] in the subject field.  These emails are not Spam.  How do I remove the [Spam] tag and tell the system that they are not Spam. 
    If the system thinks they are Spam, why don't they go straight into the Spam folder?

    Hi orange_dude,
    Check out this link for more info on how to filter spam. Let me know if this helps.
    Thanks
    Neil
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Removing specific XML tag in XSLT mapping

    Hi there,
    I've asked before about a XML to string XSLT mapping and the answers provided here helped me to successfully do that mapping! Thanks a lot!
    I'm using the following mapping to convert a string back to XML.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:m="http://my.namespace.com">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
         <xsl:template match="/">
              <xsl:for-each select="//m:my_tag">
                   <xsl:value-of select="." disable-output-escaping="yes"/>
              </xsl:for-each>
         </xsl:template>
    </xsl:stylesheet>
    But now, I'm having a problem converting back from string to XML. The response tag "m:mytag" has a string like this:
    "<?xml version="1.0" encoding="UTF-8"?><tag1><tag2>Data</tag2></tag1>".
    And  when I use the XSLT mapping shown above, the output file comes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml version="1.0" encoding="UTF-8"?>
    <tag1>
    <tag2>Data</tag2>
    </tag1>
    As you can see, the initial <?xml ...> tag is duplicated, and it generates a parsing error in XI.
    How can I eliminate one of the "<?xml version="1.0" encoding="UTF-8"?>" strings in the mapping?
    Thanks a lot.

    Wow!!!
    The output="html" actually worked on XML Spy!
    Removing the XSLT file initial tag didn't work.
    I had already resolved this problem using the replace-string method that I found here: http://aspn.activestate.com/ASPN/Cookbook/XSLT/Recipe/65426
    But your method is way more elegant and efficient. :o)
    I'll test the html method on XI, but I'm almost sure it'll work too.

  • How do I remove or change tags in a photo?

    In some of my images, the wrong tags have appeared on some people's photos. How do I correct or remove these?

    Hello,
    This sounds like an issue specifically for a social media website. If this is for Facebook, please go to their relevant help page, such as:
    * https://www.facebook.com/help/www/366702950069221

Maybe you are looking for

  • IPod is connected to an other logical DB after reinstalling iTunes

    After a PC crash I had to set it up again. As a result all my iTunes songs are gone. I reinstalled iTunes but when connecting the iPod I get the message that my iPod is connected to another logical DB and if I would like to change that. How can I cop

  • RMI Hello Example under Windows

    I'm trying out the Sun RMI Hello World example to find out more about RMI http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html I'm using JDK1.6, under WinXP. I've compiled the classes, then tried to run the Server using start java exa

  • Upgrade to Solaris 8 - Solstice Backup

    Hi, I currently have Solstice Backup v5.0.1, patched with 105658-05 on Solaris 2.6. When I upgrade to Solaris 8 can I reinstall Solstice Backup v5.0.1 or will I have to upgrade it too? Thanks D

  • Ridiculous printing problem - please help!

    Hello, I have Photoshop CS5 and an Artisan 800 printer, and I'm in the middle of the biggest printer nightmare I've ever had.  I need to print a DVD insert, printing to regular letter paper in landscape mode.  11x8.5.  Landscape is selected.  Letter

  • ERROR WHEN READING ELEMENT IN SAPSCRIPT

    Hi All, In a custom PO form, I am getting error when reading element in WRITE_FORM. This element 'ITEM_MPN_LISTLINE' and 'ITEM_MPN_LISTHEADER' are in the standard form and I copied the same to custom form and added the relevant coding in the driver p