Delete xml messagetype tag and xml versioning tag in target xml file

Hi experts.
i want to delete the xml version, starting (<MT_ZMPSSERRMSGMST_SEND>*and ending </MT_ZMPSSERRMSGMST_SEND> tags in below message.
here i am bold the tags which i want to delete. please help me how to delete this.
<?xml version="1.0"; encoding="UTF-8"?>
<MT_ZMPSSERRMSGMST_SEND>
   <MESSAGE>
      <TABLENAME/>
      <ACTION/>
      <RECORD>
         <ERRORID/>
         <ERRCLASSID/>
         <SHORTDESC/>
         <DESCRIPTION/>
         <RESOLVE/>
      </RECORD>
   </MESSAGE>
</MT_ZMPSSERRMSGMST_SEND>

Hi Srinivas,
You can delete the required content of the XML by editing the XML.
Develop a custom adapter module and use the below code to edit the xml and deleting the highlighted content
// to read the input XML
strData = xmlData.getText();
// get the length of <?xml version="1.0"; encoding="UTF-8"?> <MT_ZMPSSERRMSGMST_SEND>
int strheaderlength = (strData.substring(0,strData.indexOf("<Message>")).length());
// read the data from <MESSAGE>  to </MESSAGE>
String payload=strData.substring(strheaderlength,strData.startIndexOf("</MT_ZMPSSERRMSGMST_SEND>"))
// set the new payload to xmlData
xmlData.setText(payload);
appreciate if useful

Similar Messages

  • After installation of latest Bridge and Photoshop version (2014.2.2) *.CR2 files will not be displayed correctly, neither in preview nor in Camera Raw dialog.

    After installation of latest Bridge and Photoshop version (2014.2.2) *.CR2 files will not be displayed correctly anymore, neither in preview nor in Camera Raw dialogue.
    Some pictures have white squares with blue and red diagonal stripes that cover almost the complete picture.
    When opening those files I have the same problem in Camera Raw dailogue and even in Photoshop eventually.
    I tried to open the same same pictures on another computer with the same version of Bridge and Photoshop but the problem remains the same.
    It seems like the files itselves are still ok, because if you open an explorer window the previews of the pictures are all ok. And the pictures' sizes remain the same.
    I tried to clear the cache in both programs but it didn't help.
    Has anyone an idea????

    First see if a reboot of your PC helps.  If not,
    Resets may be in order:
    Photoshop: Press and hold Control - Shift - Alt immediately upon cold-starting Photoshop.  If you get the keys down quickly enough - and you have to be VERY quick - it will prompt you to confirm deletion of your established preferences, which will lead to them all being set to defaults.
    Bridge:  Start Adobe Bridge and immediately press Ctrl+Alt+Shift (Windows) or Command+Option+Shift (Mac OS) until the Reset Settings dialog box appears. Select all three options--Reset Preferences, Reset Standard Workspaces, and Purge Entire Thumbnail Cache--and then click OK.
    Outdated graphics drivers can also cause display problems. Go to your GPU maker's website and be sure you have the latest drivers for your card model.

  • Generate coldfusion xml file

    Hello everyone,
    i've been using cffile > write to create xml files to use
    in my flash.
    i was wondering if i can generate a coldfusion xml-file that
    can be read like a regular xml file by flash eg.
    This way i could read from xml on the fly instead of creating
    and delete xml files each time i need some information...
    Tnx for any help
    Greetz,
    Yannovich

    Tnx hotcfm and Abinidi,
    i'm still nog though this though...
    tnx for any help!
    first i tried reading my cfpage in flash as if it where an
    xml document:
    flash:
    xml_detail=new XML();
    xml_detail.ignoreWhite=true;
    xml_detail.onLoad=do_initxml;
    xml_detail.load("test.cfm?r="+random(65453121564876));
    coldfusion test.cfm:
    <cfoutput>#myXMLer#</cfoutput>
    then i tried and change my code so to use cfxml and a
    variable name:
    flash:
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    var str_xml= result_lv.myXMLer;
    xml_detail=new XML(str_xml);
    t_result.text=str_xml
    gotoAndPlay(_currentframe+1)
    } else {
    t_result.text = "Error connecting to server.";
    var send_lv:LoadVars = new LoadVars();
    send_lv.r = random(12134567864512345)
    send_lv.sendAndLoad("test.cfm", result_lv, "POST");
    coldfusion test.cfm:
    <cfxml variable="myXMLer">
    <inhoud>
    <w id="test" />
    </inhoud>
    </cfxml>

  • Problems with and tags while reading the xml file

    Hi
    I am using the xml files in my project. The project uses Tomcat, JMS. The project is divided into some components which communicate with each oher thru JMS. The component for which I am responsible gets a dcoument object from the JMS which is a processed xml of the following format (the processing is done by the DBMS_XMLGEN package of oracle)
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <filename>157_1000000001</filename>
    <querydata>
    <tabdata>
    <tabinfo>Tab-id3</tabinfo>
    <queryset>
    <query name="Fax">
    select a.ARLN_NAME,d.TICKETED_ORIGIN,d.TICKETED_DESTINATION, d.ENDORSEMENTS,to_char(d.DATE_OF_ISSUE,'DDMONYY') as DATE_OF_ISSUE ,d.EXCHANGE_DOC_TYPE,
                   d.PASSENGER_NAME,d.ORIG_ISS_AIRLINE,d.ORIG_DOC_NO,d.ORIG_PLACE_OF_ISSUE,
                   to_char(d.ORIG_DATE_OF_ISSUE,'DDMONYY'),d.ORIG_ISSUE_AGENT,d.CUR_OF_SALE,d.GROSS_FARE,d.EQUIV_CUR_OF_SALE,d.EQUIV_FARE,
                   d.PANDA_DEAL_CODE,d.ISI,d.reporting_date
                   from airline_master a,ticket_main d,ticket_conj e where d.doc_no = e.doc_no and d.iss_airline = e.iss_airline
                   and e.conj_doc_no = (select DOC_NO from TICKET_CONJ where CONJ_DOC_NO = 1000000001 and ISS_AIRLINE = 157)
                   and e.ISS_AIRLINE = 157 and d.iss_airline = a.ARLN_NUM_CODE
    </query>
    </queryset>
    </tabdata>
    </querydata>
    the function on my side is like this
    private void processMessage(ObjectMessage objmessage)
         Document XMLreqObject = (Document) objmessage.getObject();
         Element root = XMLreqObject.getRootElement();                
         String resultFilename = root.getChildText("filename");
         Element tabSet = root.getChild("querydata");//doesnt work
         ArrayList tabSetlist = new ArrayList(tabSet.getChildren ("tabdata"));//doesnt work
    The code commented with "doesnt work", is not working. What must be the problem ?
    Thanks in Advance
    Martin

    Okay. Your original example XML didn't include < or > which was rather confusing if that particular feature was supposed to be the cause of the problem. Also calling them "tags" was rather confusing since "tags" is the term for the things that come at the beginning and of an element, like this:<data>...</data>Anyway, I assume your theory is that documents that don't have < in a text element process correctly and documents that do have < in a text element get "stuck" in the parser? Well, from your original description the process appears to be:
    1. Create XML
    2. Parse it into a Document
    3. Send the Document via JMS
    4. Receive the Document via JMS
    5. Process it.
    And it's step 4 that is "stuck"? That would be my guess based on the code you posted.

  • Reading a xml file and Extract content of xml tags

    Hi,
    I need a InDesign script to Extract content of xml tags by reading a local xml file. And stamping the content of xml on InDesign Text frame.
    My sample xml is as follows .
    <events type="array">
    <event> 
    <aktiv_jn>J</aktiv_jn> 
    <enetpulse_id>1712408</enetpulse_id>
    <event_id>65974</event_id>
    <hjemmehold>AZ Alkmaar</hjemmehold>
    <id>93</id>
    <kickoff>2014-08-17T12:30:00+01:00</kickoff>
    <land_id>140</land_id>
    <land_navn>Holland</land_navn>
    <liga_id>13684</liga_id>
    <liga_navn>Eredivisie</liga_navn>
    <livebetting_jn>J</livebetting_jn>
    <marked_id>2897740</marked_id>
    <marked_nummer>138</marked_nummer>
    <marked_tekst>AZ Alkmaar - Ajax</marked_tekst>
    <moderkamp_jn>J</moderkamp_jn>
    <ob_bet_type>MR</ob_bet_type>
    <odds_1>2.95</odds_1>
    <odds_2>2.25</odds_2>
    <odds_x>3.35</odds_x>
    <program_slut>2014-08-18T23:59:00+01:00</program_slut>
    <program_start>2014-08-15T00:00:00+01:00</program_start>
    <resultat>2</resultat>
    <spilstop_dato_tid>2014-08-17T12:30:00+01:00</spilstop_dato_tid>
    <sport_id>21</sport_id>
    <sport_navn>Fodbold</sport_navn>
    <taerskel nil="true"/>
    <udehold>Ajax</udehold>
    <udfald_1_id>9661951</udfald_1_id>
    <udfald_2_id>9661953</udfald_2_id>
    <udfald_x_id>9661952</udfald_x_id>
    </event>
    </events>
    And on my Indesign Page upon execution of script: I need text like,
    land_navn:     Holland
    odds_1:     2.95
    odds_2:     2.25
    odds_x:     3.35

    Hi,
    Try:

  • How to delete xml tags Urgent

    on release function i am inserting this value
    "(&-box*&", "&*box-&
    " in to my text box,
    in text box will display like this (squarebox), when i am
    trying to delete
    squarebox ,
    box deleting but
    (&-box*&", "&*box-&
    these xml elements are showing , what i have to
    do ? it has to delete,
    it amy have multipule box in my equation. how do delete xml
    elements in this case, this is my xml code. how to delete? any one
    can help me?

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • How to delete XML Tags in already tagged text?

    Hi everyone,
    I looked in all the topics but with no results.
    Is there anyone that can help me with this script?
    Thanks
    Ivan

    Then you should provide more details on what you want this new script should do.
    To "delete XML tags in already tagged text", all you need is use the "untag" command on an XML Element. But how would the script "know" what XML Element should be untagged?
    Disclaimer: This reply is in no way enforceable, legally binding, a promise or contract, an agreement (written, verbal, or otherwise), a commitment, obligation, or free or paid-for offer of any kind to further help, guide, aid, tip, or not hinder you, or contribute to, correct, investigate, comment on or assist with any existing, forthcoming, or planned project.

  • Can the "mode" tag in vhost.xml file be edited using getconfig() and setconfig()?

    can the "mode" tag in vhost.xml file be edited using getconfig() and setconfig()?

    You can create client and have following code in it: (But before that Admin Server is running on the machine which you want make edge server programatically)
    var admin_nc = new NetConnection();
    sendCommand.enabled = false;   // where sendCommand is button on stage with "sendCommand" as instance name
    admin_nc.onStatus = function(info) {
    if (info.code == "NetConnection.Connect.Success")
    sendCommand.enabled = true;
    sendBtn.addEventListener("click", callAdminAPI);
    function callAdminAPI() {
    admin_nc.call("setConfig2",new Result1(),"Proxy/Mode","remote","Adaptor:_defaultRoot_/VHost:_defaultVHost_");
    function Result1() {
          this.onResult = function(info) {
    if (info.code == "NetConnection.Call.Success" ) {
    admin_nc.call("startServer",new Result2(),"restart"); // you can might as well use restartVHost
    function Result2(){
    this.onResult = function(info) {
    if (info.code == "NetConnection.Call.Success" ) {
    trace("Server started successfully);
    admin_nc.connect("rtmp://<your Edge Server IP>:1111/admin","admin","admin");  //here admin/admin is userid/password of Admin of server

  • Insert Encoding tag into xml file. ?xml version="1.0"?

    I am using oracle 10g.
    I am using dbms_xmlgen.getxml function to generate xml data for oracle tables. I use utl_file to write data back into xml file.
    Oracle is generating the file in the following manner...
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <RSLT_ID>1</RSLT_ID>
    </ROW>
    </ROWSET>
    I want to change the following xml header to have encoding information in it as follows...
    <?xml version="1.0" encoding = "AL32UTF8"?>
    How do I achieve that?
    Any suggestions?

    I want to change the following xml header to have encoding informationIn 10g I think you could use a xmlroot hack:
    SQL> select xmlroot(xmlelement(e, dummy), version '1.0" encoding="AL32UTF8') xml from dual
    XML                                                    
    <?xml version="1.0" encoding="AL32UTF8"?>              
    <E>X</E>                                               
    1 row selected.

  • How can I convert the metadata tags on my mp4s to xml files so that they can be read in Windows Media Center?

    I have a library with almost 3000 movies and TV shows that I have fully tagged. However, I have decided to start using Windows Media Center and it does its metadata tagging through XML files.  I wanted to know if anyone could tell me if there was a way to extract the metadata from those mp4s and convert them to a format that WMC could read?  Thanks!!!!

    iTunes can make XML playlists so it might be all you need, I made a simple one file playlist and exported it from iTunes. The result is shown below. In principle I could delete the playlist and the entry from the library, as long as I don't delete the file, then later reimport the XML playlist file. I haven't tested this particular scenario, but I assume that iTunes will read all the properties as listed unless it can read some kind of tag from the file itself in which case the current value of the tag would take precedence.
    What I don't know is what media center would make of this file, or what its files look like, however assuming they have a similar structure that can be decoded then it should be possible to read data from the iTunes library and write out a text file that will make sense to media centre.
    Video Test.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Major Version</key><integer>1</integer>
    <key>Minor Version</key><integer>1</integer>
    <key>Date</key><date>2013-09-26T23:30:26Z</date>
    <key>Application Version</key><string>11.1</string>
    <key>Features</key><integer>5</integer>
    <key>Show Content Ratings</key><true/>
    <key>Music Folder</key><string>file://localhost/E:/iTunes/iTunes%20Media/</string>
    <key>Library Persistent ID</key><string>CCF046191585EA85</string>
    <key>Tracks</key>
    <dict>
    <key>155170</key>
    <dict>
    <key>Track ID</key><integer>155170</integer>
    <key>Name</key><string>Abbott &#38; Costello: "Two Tens For A Five" &#38; "Who's On First"</string>
    <key>Artist</key><string>Abbott &#38; Costello</string>
    <key>Album Artist</key><string>Abbott &#38; Costello</string>
    <key>Album</key><string>Abbott &#38; Costello: "Two Tens For A Five" &#38; "Who's On First"</string>
    <key>Genre</key><string>Comedy Clip</string>
    <key>Kind</key><string>MPEG-4 video file</string>
    <key>Size</key><integer>110483524</integer>
    <key>Total Time</key><integer>532096</integer>
    <key>Year</key><integer>1950</integer>
    <key>Date Modified</key><date>2013-06-19T17:35:18Z</date>
    <key>Date Added</key><date>2012-12-01T17:30:57Z</date>
    <key>Bit Rate</key><integer>156</integer>
    <key>Comments</key><string>www.dvdvideosoft.com</string>
    <key>Artwork Count</key><integer>1</integer>
    <key>Persistent ID</key><string>5AF2C490D1E065CD</string>
    <key>Track Type</key><string>File</string>
    <key>Has Video</key><true/>
    <key>HD</key><false/>
    <key>Video Width</key><integer>1136</integer>
    <key>Video Height</key><integer>640</integer>
    <key>Location</key><string>file://localhost/E:/iTunes/iTunes%20Media/Home%20Vide os/Abbott%20&#38;%20Costello_%20_Two%20Tens%20for%20a%20Five_%20&#38;%20_Who's%2 0on%20First_.mp4</string>
    <key>File Folder Count</key><integer>3</integer>
    <key>Library Folder Count</key><integer>1</integer>
    </dict>
    </dict>
    <key>Playlists</key>
    <array>
    <dict>
    <key>Name</key><string>Video Test</string>
    <key>Playlist ID</key><integer>1930541</integer>
    <key>Playlist Persistent ID</key><string>30BF2769C94F7F29</string>
    <key>All Items</key><true/>
    <key>Playlist Items</key>
    <array>
    <dict>
    <key>Track ID</key><integer>155170</integer>
    </dict>
    </array>
    </dict>
    </array>
    </dict>
    </plist>
    Such files are easier to interpret if opened with Notepad++.
    tt2

  • Delete xml version in xml file

    Hello,
    I have a strange thing to do. I need to delete xml version tag (<?xml version="1.0" encoding="utf-8" ?>) from en xml file. I use a receiver file adapter and I want to know how it's possible to delete this tag.
    I need to do that as receiving application collects xml messages and adds xml version in collected xml file.
    Thanks in advance,
    Cédric

    hi Udo,
    >>>and clever...
    so it should be you who proposed it:)
    BTW
    I'm not sure if with XSLT you won't have to
    do it in the commnication channel (and not in the interface mapping) - (the xslt mapping)
    but I cannot test it right now
    Regards,
    michal

  • XSLT mapping code to replace ns1: tag as plm: in XML file in PI mapping

    Hi
    I am sending XML file to HTTP server as below format
    <?xml version="1.0" encoding="UTF-8" ?>
       - <ns1:Responses xmlns:ns1="http://">
    -    <ns1:Response Application="SAP">
        <ns1:field1>12345</ns1:field1>
        <ns1:field2>abc</ns1:field2>
       - <ns1:Items>
        <ns1:doc></ns1:doc>
      </ns1:Items>
      </ns1:Response>
      </ns1:Responses>
    i hve to replace <ns1: as <plm:, i could able to delete <ns1: tag uisng XSLT mapping(in sdn), but i dont know how to add tag with <plm:
    Hi XSLT experts/if any has come across this requirment, please send XSLT code to add tag in XML.
    Regards,
    Rajesh

    No need for XSLT, just use the XMLAnonymizerBean module in your receiver communication channel.
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/d169186a29570ae10000000a114a6b/frameset.htm
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    If your receiver CC cannot process modules (ABAP receiver, for example), in your XSLT just define the target namespace with the desired prefix.
    Regards,
    Henrique.

  • How to get a sub tag in xml file

    As the xml file is the below thing ------
    <?xml version="1.0" encoding="UTF-8"?>
    <addRequest xmlns:spml="urn:oasis:names:tc:SPML:2:0">
         <data>
         <attributes>
                   <attr name="Objectclass">
                        <value>SafePolicy</value>
                   </attr>
                   <attr name="name">
                        <value>NewPolicy</value>
                   </attr>
                   <attr name="Resource">
                        <value>NewResourceclass</value>
                   </attr>
                   <attr name="Description">
                        <value>This is a New AccessPolicy</value>
                   </attr>
              </attributes>
         </data>
    </addRequest>
    The Schema has only the data and i was able to get the data object and the data can contain any namespace ,so i had the attributes and which inturn contain the attr and value .I have to get the Attributes , so that i can get the attr(name) and value pairs.Initially i did the unmarshal stuff and got until data but giving an error when i try to obtain the other tags .Can any body send the code for obtaining that by using the unmarshalling concept please.I need it .
    Thank you,

    Thank you,
    As i was trying to obtain the input to UI from an xml file by which the axis converts to java objects and inturn have to get the reply as xml file . The error was in the jar files ,when i loaded the jar files another time my code started working.

  • Getting an error while changing a tag in an XML file

    Hi,
    When I am trying to replace the existing XML tag with other one I am getting the following exception:
    org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
    at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
    at org.apache.xerces.dom.ParentNode.replaceChild(Unknown Source)
    at org.apache.xerces.dom.CoreDocumentImpl.replaceChild(Unknown Source)
    at com.Replace_Tag.replaceNode(Replace_Tag.java:97)
    at com.Replace_Tag.processRequest(Replace_Tag.java:39)
    at com.Replace_Tag.doGet(Replace_Tag.java:56)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    The following is the code I am using :
    public void replaceNode() throws Exception{
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.parse("file:/C:/Documents and Settings/srikanth.d.KNOAHSOFT/Desktop/Linechart.jrxml");
            Element root = doc.getDocumentElement();
            Element newElement = doc.createElement("stackedBarchart");
            NodeList oldList = root.getElementsByTagName("lineChart");
            int length = oldList.getLength();
            System.out.println("length::"+length);
            for(int i=0;i<length;i++)
                Node oldNode = oldList.item(i);
                NodeList nl = doc.getChildNodes();
    newElement.getTagName().toString());                   
    (i).getNodeName().toString());
                doc.replaceChild((Node)newElement, oldNode);           
    Can anybody help me in this regard...
    Thanks and Regards
    DNV Srikanth

    i am posting the xml file also :
    <?xml version="1.0" encoding="UTF-8"  ?>
    <!-- Created with iReport - A designer for JasperReports -->
    <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport
               name="Line chart"
               columnCount="1"
               printOrder="Vertical"
               orientation="Portrait"
               pageWidth="396"
               pageHeight="842"
               columnWidth="396"
               columnSpacing="0"
               leftMargin="0"
               rightMargin="0"
               topMargin="0"
               bottomMargin="0"
               whenNoDataType="NoPages"
               isTitleNewPage="false"
               isSummaryNewPage="false">
         <property name="ireport.scriptlethandling" value="2" />
         <property name="ireport.encoding" value="UTF-8" />
         <import value="java.util.*" />
         <import value="net.sf.jasperreports.engine.*" />
         <import value="net.sf.jasperreports.engine.data.*" />
         <queryString><![CDATA[select * from evalsubcomparison where qacount1 between 70.0 and 75.0]]></queryString>
         <field name="EmpId" class="java.lang.Double"/>
         <field name="Empname" class="java.lang.String"/>
         <field name="BaseEmpId" class="java.lang.Double"/>
         <field name="QACount1" class="java.lang.Double"/>
         <field name="WeekId1" class="java.lang.String"/>
         <field name="QACount2" class="java.lang.Double"/>
         <field name="WeekId" class="java.lang.String"/>
         <field name="QACount3" class="java.lang.Double"/>
         <field name="WeekId3" class="java.lang.String"/>
         <field name="QACount4" class="java.lang.Double"/>
         <field name="WeekId4" class="java.lang.String"/>
         <field name="level" class="java.lang.Double"/>
              <background>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </background>
              <title>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </title>
              <pageHeader>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </pageHeader>
              <columnHeader>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </columnHeader>
              <detail>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </detail>
              <columnFooter>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </columnFooter>
              <pageFooter>
                   <band height="0"  isSplitAllowed="true" >
                   </band>
              </pageFooter>
              <summary>
                   <band height="301"  isSplitAllowed="true" >
                        <lineChart>
                             <chart  hyperlinkTarget="Self" >
                             <reportElement
                                  mode="Opaque"
                                  x="0"
                                  y="0"
                                  width="390"
                                  height="300"
                                  backcolor="#FFFFFF"
                                  key="element-1"/>
                             <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
                                  <chartLegend textColor="#000000" backgroundColor="#FFFFFF" >
                             <font fontName="Times New Roman" pdfFontName="Helvetica" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false" pdfEncoding="Cp1252"/>
                             </chartLegend>
                             </chart>
                             <categoryDataset>
                                  <dataset >
                                  </dataset>
                                  <categorySeries>
                                       <seriesExpression><![CDATA["WE "+$F{WeekId1}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{Empname}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{QACount1}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                                  <categorySeries>
                                       <seriesExpression><![CDATA["WE "+$F{WeekId}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{Empname}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{QACount2}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                                  <categorySeries>
                                       <seriesExpression><![CDATA["WE "+$F{WeekId3}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{Empname}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{QACount3}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                                  <categorySeries>
                                       <seriesExpression><![CDATA["WE "+$F{WeekId4}]]></seriesExpression>
                                       <categoryExpression><![CDATA[$F{Empname}]]></categoryExpression>
                                       <valueExpression><![CDATA[$F{QACount4}]]></valueExpression>
                        <itemHyperlink >
                        </itemHyperlink>
                                  </categorySeries>
                             </categoryDataset>
                             <linePlot >
                                  <plot backcolor="#FFFFFF" />
                                  <categoryAxisFormat>
                                       <axisFormat >
                                       </axisFormat>
                                  </categoryAxisFormat>
                             <valueAxisLabelExpression><![CDATA["No. of Evaluations"]]></valueAxisLabelExpression>
                                  <valueAxisFormat>
                                       <axisFormat >
                                            <labelFont>
                             <font fontName="Serif" pdfFontName="Helvetica" size="14" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" isPdfEmbedded="false" pdfEncoding="Cp1252"/>
                                            </labelFont>
                                            <tickLabelFont>
                                            </tickLabelFont>
                                       </axisFormat>
                                  </valueAxisFormat>
                             </linePlot>
                        </lineChart>
                   </band>
              </summary>
    </jasperReport>can anybody pls help me in this regard......

  • Selecting the first 4000 characters from a tag in an xml file

    Oracle Enterprise Edition 11.1.0.7 64 bit (Jan 2012 CPU applied)
    Windows 2003 64 bit
    We have an XML file with the following sample format.
    <?xml version="1.0"?>
    <HR>
    <EMP>
    <FNAME>JOHN</FNAME>
    <LNAME>DOE</LNAME>
    <COMMENT>Comment with less than 4000 characters</COMMENT>
    </EMP>
    <EMP>
    <FNAME>JANE</FNAME>
    <LNAME>DOE</LNAME>
    <COMMENT>Comment with more than 4000 characters</COMMENT>
    </EMP>
    </HR>
    The query below
    (full disclosure: which I took from odie_63's response in Creating External Table using Xml Dataset - how to include null values? and added the CURSOR_SHARING_EXACT hint on the top)
    works when the contents of the <Comment> tag are smaller than 4000 characters. If it is more than 4000 I get
    ORA-01706: user function result value was too large
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'COMMENT'
    I found another query where someone was doing a substring (I think to get only the first 4000 characters from the tag) here.
    http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14638197 (See OP's post)
    TERMINATION_DATE VARCHAR(32) path 'TerminateDate/substring(text(), 1, 32)',
    So I updated my query to be
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'COMMENT/substring(text(),1,4000)'
    The query runs without an error when the <comment> tag has 4000 or less characters but still errors out with it is more than 4000.
    I found an alternative method to do the SUBSTRING here in Herald ten Dam's reponse in Re: A view over XML that is not 1:1
    code varchar2(30) path 'substring(code,1,3)',
    so I tried this:
    SELECT /*+ CURSOR_SHARING_EXACT */
    FROM XMLTable(
    '/HR/EMP'
    passing xmltype( bfilename('DATA_PUMP_DIR','emp.xml'), nls_charset_id('CHAR_CS') )
    columns
    first_name varchar2(30) path 'FNAME',
    last_name varchar2(30) path 'LNAME',
    comments varchar2(4000) path 'substring(COMMENT,1,4000)'
    but that doesn't work either.
    How can I extract the first 4000 characters of the <COMMENT> tag so that the query doesn't fail.
    We are not using any other XMLDB features at this time. This is the first we've started looking into using Oracle built in XML features, so we might not have setup something that other's might know to specifically setup to start using the XML features in Oracle 11.1
    Thanks in advance,
    Wally

    walls99 wrote:
    This is regardless of the COMMENTS tag being 4000 characters or more and the same with the ideas from Odie.
    WallyNo idea if it is an issue with your version. I don't have your version to test but following works for me. Does this simple test work?
    SQL> select * from v$version ;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> set define off
    SQL> select dbms_xmlgen.convert(xmlserialize(content xmltype('<brand>Ben &amp; Jerry</brand>') as clob), 1) from dual ;
    DBMS_XMLGEN.CONVERT(XMLSERIALIZE(CONTENTXMLTYPE('<BRAND>BEN&AMP;JERRY</BRAND>')A
    <brand>Ben & Jerry</brand>

  • Instance variable to hold the element of a tag in the xml file

    Hi I have an xml file that is handled using this parser
    <attr id="MY_NAME" >
    this parser hanled the above tag but now I want to have it handle
    <attr id="MY_NAME" desc="GOOD">
    but I need to create an instance variable to handle the desc element in the attr tag .
    Can some one help me out as this is not my file and I am having trouble to do please......
    import java.util.*;
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
       The SupportMatrix class provides static variables and methods to simplify
       the determination of whether or not a given attribute is supported for a
       certain object type (queue manager, channel, etc.), depending on the version
       and platform of the queue manager to which it belongs.
       The SupportMatrix class may not be instantiated. Its constructor is private.
       An instance of the class is created internally in the static initializer so
       that the XML parsing methods are available.
       A corresponding XML document, SupportMatrix.xml, is parsed to create the various
       HashMaps which contain the version/platform dependency information. A number of
       inner classes are used to represent the various elements of the XML matrix
       definition.
       Here's a sample document:
       <!-- The supportmatrix tag opens the document -->
       <supportmatrix>
         <!-- Objects are keyed by classid. "1" is the classid of a queue manager object. -->
         <object classid="1">
           <!-- Versions group attributes according to the queue manager version where they
                were introduced. The "base" cmdlevel encompasses all versions up to 5.1. -->
           <version cmdlevel="base">
             <!-- Attributes are defined by the attr tag. -->
             <attr id="MQCA_Q_MGR_NAME">
               <!-- Support elements define the platform-specific requirements for an attribute. -->
               <support platforms="UNIX,WINDOWS,OS400,VMS,NSK" maxlen="48" type="MQCFST"/>
               <support platforms="MVS" maxlen="4" type="MQCFST"/>
             </attr>
             <attr id="MQCA_Q_MGR_DESC">
               <!-- Specific attribute characteristics, most notably maximum len for string parms,
                    are defined in the support element. As shown in the following example, it may
                    apply to all platforms. -->
               <support platforms="all" maxlen="64" type="MQCFST"/>
             </attr>
             <!-- Support elements are optional. -->
             <attr id="MQIA_PLATFORM"/>
             <attr id="MQIA_COMMAND_LEVEL"/>
           </version>
           <!-- The version element may 'include' other versions. Note that object elements
                may also refer to other objects via the 'include' parm of the object tag.
                This is to allow common attributes (especially for queues and channels) to
                be shared by multiple definitions in order to reduce some of the
                redundancy. -->
           <version cmdlevel="520" include="base">
           </version>
         </object>
       </supportmatrix>
       The inner classes, and their hierarchical relationships are as follows:
         SupportObject - corresponds to the <object> element. Stored in a static HashMap, and
                         keyed by classid.
           VersionObject - corresponds to the <version> element. Stored in a HashMap instance
                           variable of the SupportObject class, keyed by cmdlevel.
             AttributeObject - corresponds to the <attr> element. Stored in a HashMap instance
                               variable of the VersionObject class, keyed by attribute name.
               PlatformObject - corresponds to the <support> element. Stored in HashMaps belonging
                                to the AttributeObjects, keyed by platform. A single PlatformObject
                                instance is created when the support tag is encountered. The
                                "platforms" attribute of the support element is then processed. For
                                each platform in the comma-delimited list, an entry is added to the
                                collection of PlatformObjects. This is to greatly simplify later
                                lookups.
       In order to support the 'include' feature of object and version elements, certain
       functions are recursive. If the attribute to be validated is not found for the passed
       cmdlevel, the 'parent' VersionObject is consulted by means of the 'include' value. If
       the chain of VersionObjects has been exhausted and the attribute in question has still not
       been located, the next SupportObject in the chain is consulted in a similar fashion.
    public class SupportMatrix extends DefaultHandler {
        /** The objects collection holds all the SupportObjects, keyed by classid. */
        private static HashMap objects;
        /** xmlFile will name the xml document to be parsed. Note that using the
            default class loader expects the string to be the path to the file. It must
            NOT begin with the '/' character. */
        private static String xmlFile =
            ResourceManager.getApplicationProperties().getProperty("SupportMatrixFile");
        private Stack stack;
        /** This static initializer allocates the static objects collection, creates an
            instance of the SupportMatrix class for xml parsing purposes, and initiates
            the parse operation to populate the collection. */
        static {
            objects = new HashMap();
            // Create a parser and process the xml doc
            SupportMatrix handler = new SupportMatrix();
            InputSource is = null;
            try {
                is = new InputSource(ClassLoader.getSystemClassLoader().getResourceAsStream(xmlFile));
                XMLReader xmlReader =
                    SAXParserFactory.newInstance().newSAXParser().getXMLReader();
                xmlReader.setFeature("http://xml.org/sax/features/namespaces", true);
                xmlReader.setContentHandler(handler);
                if (is == null) {
                    System.err.println("No input stream, dammit");
                xmlReader.parse(is);
            } catch(Exception e) {
                e.printStackTrace();
        /** Private constuctor, used only for XML parsing. */
        private SupportMatrix() {
            stack = new Stack();
        /** Add a SupportObject instance to the objects collection. */
        private void addObject(SupportObject obj) {
            String key = obj.getClassId();
            objects.put(key, obj);
        /* DefaultHandler methods                                              */
        /** Not used. */
        public void characters(char[] ch, int start, int length) {}
        /** Not used. */
        public void endDocument() {}
        /** For the version, object, and attr elements, pop the top element of the stack. */
        public void endElement(String uri, String localName, String qName) {
            if (localName.equals("version") || localName.equals("object") || localName.equals("attr")) {
                stack.pop();
        /** Not used. */
        public void setDocumentLocator(Locator locator) {}
        /** Not used. */
        public void startDocument() {}
        /** Most of the work is done here. Create the appropriate inner class instance for
            element; for object, version, and attr, push the element onto the stack so that
            child elements may be added to their collections as needed. */
        public void startElement(String uri, String localName, String qName,
                                 Attributes attributes) {
            String include = attributes.getValue("include");
            if (localName.equals("object")) {
                SupportObject obj = new SupportObject(attributes.getValue("classid"), include);
                addObject(obj);
                stack.push(obj);
            } else if ( localName.equals("version")) {
                VersionObject ver = new VersionObject(attributes.getValue("cmdlevel"), include);
                ((SupportObject)stack.peek()).addVersion(ver);
                stack.push(ver);
            } else if ( localName.equals("attr")) {
                AttributeObject a = new AttributeObject(attributes.getValue("id"));
                //String desc = StringFactory.getString(attributes.getValue("desc"));
                //if(desc != null)
                   //     a.setAttribute();
                String readonly = attributes.getValue("readonly");
                String exclude = attributes.getValue("exclude");
                if (include != null && exclude != null) {
                    Log.log(Log.ERROR, this, "include and exclude are mutually exclusive, exclude value ignored");
                    exclude = null;
                if (include != null) {
                    a.setCondition(include, true);
                if (exclude != null) {
                    a.setCondition(exclude, false);
                if (readonly != null)
                    a.setReadonly(readonly.equals("y"));
                ((VersionObject)stack.peek()).addAttr(a);
                stack.push(a);
            } else if (localName.equals("support")) {
                String platforms = attributes.getValue("platforms");
                String readonly = attributes.getValue("readonly");
                String maxlen = attributes.getValue("maxlen");
                String type = attributes.getValue("type");
                int attrType = 0;
                if (type != null) {
                    if (type.equals("MQCFIN")) {
                        attrType = CMQCFC.MQCFT_INTEGER;
                    } else if (type.equals("MQCFIL")) {
                        attrType = CMQCFC.MQCFT_INTEGER_LIST;
                    } else if (type.equals("MQCFST")) {
                        attrType = CMQCFC.MQCFT_STRING;
                    } else if (type.equals("MQCFSL")) {
                        attrType = CMQCFC.MQCFT_STRING_LIST;
                    } else if (type.equals("EXBIN")) {
                        attrType = MqcConstants.EXCFT_BINARY;
                    } else if (type.equals("EXPCF")) {
                        attrType = MqcConstants.EXCFT_PCF;
                PlatformObject p = null;
                if (readonly == null) {
                    p = new PlatformObject(platforms);
                } else {
                    p = new PlatformObject(platforms, readonly.equals("y"));
                String exclude = attributes.getValue("exclude");
                if (include != null && exclude != null) {
                    Log.log(Log.ERROR, this, "include and exclude are mutually exclusive, exclude value ignored");
                    exclude = null;
                if (include != null)
                    p.setCondition(include, true);
                if (exclude != null)
                    p.setCondition(exclude, false);
                if (attrType != 0)
                    p.setType(attrType);
                if (maxlen != null)
                    p.setLen(Integer.parseInt(maxlen));
                ((AttributeObject)stack.peek()).addPlatform(p);
        public static boolean isExported(int attribute, TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isExported(name, node);
        public static boolean isExported(String attribute, TopologyModelNode node) {
            // Find the qmgr node to fetch platform and cmdlevel
            TopologyModelNode qmgr = node.getModel().getQMgrNode(node.getAddress());
            // If there's no qmgr for this node, it must be one of 'ours'.
            if (qmgr == null)
                return false;     // None of 'our' objects can be exported to MQSC.
            String classId = node.getClassId();
            String cmdLevel = qmgr.getAttributeValue("MQIA_COMMAND_LEVEL");
            String platform = qmgr.getAttributeValue("MQIA_PLATFORM");
            return isExported(attribute, classId, cmdLevel, platform, node);
        public static boolean isExported(int attribute, String classId, String cmdLevel, String platform,
                                         TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isExported(name, classId, cmdLevel, platform, node);
        /** Determine if an attribute is exportable. The attribute name, the classid of the object to
            which it belongs, plus the command level and platform of the queue manager are all needed
            to make this determination.
            Start by finding the AttributeObject for the combination of attribute, classid, and
            command level. If we can't find the AttributeObject, we assume that the attribute
            is not exported. Otherwise, find out if it is exportable for the selected platform.
        public static boolean isExported(String attribute, String classId, String cmdLevel, String platform,
                                         TopologyModelNode node) {
            AttributeObject attr = getAttributeObject(attribute, classId, cmdLevel);
            if (attr == null) {
                return false;
            } else {
                return attr.isExported(platform, node);
        public static boolean isSupported(int attribute, TopologyModelNode node) {
            String name = ResourceManager.getAttributeName(attribute);
            return isSupported(name, node);
        public static boolean isSupported(String attribute, TopologyModelNode node) {
            // Find the qmgr node to fetch platform and cmdlevel
            TopologyModelNode qmgr = node.getModel().getQMgrNode(node.getAddress());
            // If there's no qmgr for this node, it must be one of 'ours'.
            if (qmgr == null)
                return true;
            String classId = node.getClassId();
            String cmdLevel = qmgr.getAttributeValue("MQIA_COMMAND_LEVEL");
            String platform = qmgr.getAttributeValue("MQIA_PLATFORM");
            return isSupported(attribute, classId, cmdLevel, platform);
        public static boolean isSupported(int attribute, String classId, String cmdLevel, String platform) {
            String name = ResourceManager.getAttributeName(attribute);
            return isSupported(name, classId, cmdLevel, platform);
        /** Determine if an attribute is supported. The attribute name, the classid of the object to
            which it belongs, plus the command level and platform of the queue manager are all needed
            to make this determination.
            Start by finding the SupportObject for the classid. If it isn't there, we make the assumption
            (for now) that the attribute is supported. The only classids for which this can occur are
            broker, agent, and the various container objects.
            Propagate the isSupported request to the chain of SupportObjects (based on 'include' values)
            until we get a 'true' result or we run out of SupportObjects. */
        public static boolean isSupported(String attribute, String classId, String cmdLevel, String platform) {
            if (attribute == null)
                return false;
            SupportObject obj = (SupportObject)objects.get(classId);
            // If the object type isn't even in the support matrix, we interpret that to
            // mean that it's a Broker or Agent, in which case all attributes are supported
            // at present.
            if (obj == null)
                return true;
            boolean result = false;
            while (result == false && obj != null) {
                result = obj.isSupported(attribute, cmdLevel, platform);
                if (result == false && obj.getInclude() != null) {
                    obj = (SupportObject)objects.get(obj.getInclude());
                } else
                    obj = null;
            return result;
        /** Locate an AttributeObject for a given attribute name, object type, and command level.
            This is a helper function for the getMaxLen and getType methods. */
        private static AttributeObject getAttributeObject(String attr, String classID, String cmdLevel) {
            AttributeObject result = null;
            SupportObject obj = (SupportObject)objects.get(classID);
            while (result == null && obj != null) {
                result = obj.getAttr(attr, cmdLevel);
                if (result == null && obj.getInclude() != null) {
                    obj = (SupportObject)objects.get(obj.getInclude());
                } else
                    obj = null;
            return result;
        /** Determine the maximum length for a given combintation of attribute name, object type,
            command level, and platform. If the AttributeObject can't be found, or if the length
            hasn't been set, return -1. */
        public static int getMaxLen(String attr, String classId, String cmdLevel, String platform) {
            AttributeObject a = getAttributeObject(attr, classId, cmdLevel);
            if (a == null)
                return -1;
            return a.getMaxLen(platform);
        /** Determine the PCF parm type for a given combintation of attribute name, object type,
            command level, and platform. If the AttributeObject can't be found, or if the length
            hasn't been set, return -1. */
        public static int getType(String attr, String classId, String cmdLevel, String platform) {
            AttributeObject a = getAttributeObject(attr, classId, cmdLevel);
            if (a == null)
                return -1;
            return a.getType(platform);
        /** Inner class to contain platform-specific info for an attribute. */
        class PlatformObject {
            /** This instance variable will contain the comma-delimited string of all
                platforms to which this object applies. */
            private String platform;
            private int maxlen;
            private String condition = null;
            private boolean include;
            private boolean readonly;
            private boolean lenSet;
            private int attrType;
            private boolean typeSet;
            public PlatformObject(String p, boolean readonly) {
                platform = p;
                this.readonly = readonly;
                lenSet = false;
                typeSet = false;
            public PlatformObject(String p) {
                this(p, false);
            public void setCondition(String condition, boolean include) {
                this.condition = condition;
                this.include = include;
            public boolean isReadonly() {
                return readonly;
            public boolean isExported(TopologyModelNode node) {
                if (condition != null) {
                    boolean test = false;
                    try {
                        test = Utilities.evaluateCondition(node, condition);
                    } catch (Exception e) {}
                    if (include ^ test)
                        return false;
                return !readonly;
            public void setLen(int len) {
                maxlen = len;
                lenSet = true;
            public void setType(int type) {
                attrType = type;
                typeSet = true;
            public String getPlatform() {
                return platform;
            public int getMaxLen() {
                if (!lenSet)
                    return -1;
                return maxlen;
            public int getType() {
                if (!typeSet)
                    return -1;
                return attrType;
        /** This class represents a specific MQSeries attribute. It can optionally contain
            instances of the PlatformObject class as needed. When the 'platforms' collection
            is empty, the attribute is supported on all platforms. It is also possible to
            include a PlatformObject for the 'all' platform, if specific attribute characteristics
            need representation. When the 'platforms' collection is non-empty, it will include one
            entry for each platform where the attribute is supported. */
        class AttributeObject {
            private String attribute;
            private String attrValue;
            private HashMap platforms;
            private String condition = null;
            private boolean include;
            private boolean readonly = false;
            public AttributeObject(String a) {
                this(a, false);
            public AttributeObject(String a, boolean readonly) {
                attribute = a;
                platforms = new HashMap();
                this.readonly = readonly;
            public void setCondition(String condition, boolean include) {
                this.condition = condition;
                this.include = include;
            public void setReadonly(boolean readonly) {
                this.readonly = readonly;
            public boolean isReadonly() {
                return readonly;
            public void addPlatform(PlatformObject p) {
                for (StringTokenizer st = new StringTokenizer(p.getPlatform(), ","); st.hasMoreTokens() ;) {
                    platforms.put(st.nextToken(), p);
            public PlatformObject getPlatform(String platform) {
                PlatformObject p = (PlatformObject)platforms.get(platform);
                if (p == null)
                    p = (PlatformObject)platforms.get("all");
                return p;
            public String getAttribute() {
                return attribute;
            public int getMaxLen(String platform) {
                PlatformObject p = getPlatform(platform);
                if (p == null)
                    return -1;
                return p.getMaxLen();
            public int getType(String platform) {
                PlatformObject p = getPlatform(platform);
                if (p == null)
                    return -1;
                return p.getType();
            public boolean isSupported(String platform) {
                if (platforms.isEmpty()) {
                    return true;
                if (platforms.containsKey(platform)) {
                    return true;
                if (platforms.containsKey("all")) {
                    return true;
                return false;
            public boolean isExported(String platform, TopologyModelNode node) {
                if (readonly) {
                    Log.log(Log.DEBUG, this, attribute + " is readonly, returning false");
                    return false;
                if (condition != null) {
                    Log.log(Log.DEBUG, this, "Testing condition = " + condition);
                    boolean test = false;
                    try {
                        test = Utilities.evaluateCondition(node, condition);
                        Log.log(Log.DEBUG, this, "Condition result is " + test);
                    } catch (Exception e) {
                        Log.log(Log.ERROR, this, "Condition through an exception");
                    if (include ^ test)
                        return false;
                if (platforms.isEmpty()) {
                    return true;
                PlatformObject p = getPlatform(platform);
                if (p == null) {
                    Log.log(Log.DEBUG, this, platform + " not found for " + attribute + ", returning false");
                    return false;
                return p.isExported(node);
        /** This class represents a specific value of a queue manager's command level. A
            given instance of this class may 'include' a 'parent' instance through its
            include instance variable. The traversal of the parent/child hierarchy is
            delegated to the SupportObject class, since that is where the collection of
            VersionObjects lives. */
        class VersionObject {
            private String cmdLevel;
            private String include;
            private HashMap attributes;
            public VersionObject(String cmdLevel, String include) {
                this.cmdLevel = cmdLevel;
                this.include = include;
                attributes = new HashMap();
            public void addAttr(AttributeObject attr) {
                attributes.put(attr.getAttribute(), attr);
            public AttributeObject getAttr(String attr) {
                return (AttributeObject)attributes.get(attr);
            public String getCmdLevel() {
                return cmdLevel;
            public String getInclude() {
                return include;
            public boolean isSupported(String attr, String platform) {
                AttributeObject obj = (AttributeObject)attributes.get(attr);
                if (obj == null) {
                    return false;
                } else
                    return obj.isSupported(platform);
        /** This class represents an MQSeries object type, as identified by its classid, e.g.
            queue manager or local queue. This class implements an include facility similar to
            that described for the VersionObject. The traversal of that hierarchy is delegated
            to the static isSupported method, because the collection of SupportObject instances
            is a static variable of the SupportMatrix class. */
        class SupportObject {
            private String classId;
            private String include;
            private HashMap versions;
            public SupportObject(String classId, String include) {
                this.classId = classId;
                this.include = include;
                versions = new HashMap();
            public void addVersion(VersionObject obj) {
                String key = obj.getCmdLevel();
                versions.put(key, obj);
            public String getClassId() {
                return classId;
            public String getInclude() {
                return include;
            public boolean isSupported(String attr, String cmdLevel, String platform) {
                boolean result = false;
                VersionObject obj = (VersionObject)versions.get(cmdLevel);
                if (obj == null)
                    obj = (VersionObject)versions.get("base");
                // I don't actually know what it means if obj is null at this point.
                // It probably can't happen.
                if (obj == null)
                    return false;
                while (result ==  false && obj != null) {
                    result = obj.isSupported(attr, platform);
                    if (result == false && obj.getInclude() != null) {
                        obj = (VersionObject)versions.get(obj.getInclude());
                    } else
                        obj = null;
                return result;
            public AttributeObject getAttr(String attr, String cmdLevel) {
                AttributeObject result = null;
                VersionObject obj = (VersionObject)versions.get(cmdLevel);
                if (obj == null)
                    obj = (VersionObject)versions.get("base");
                // I don't actually know what it means if obj is null at this point.
                // It probably can't happen.
                if (obj == null)
                    return null;
                while (result ==  null && obj != null) {
                    result = obj.getAttr(attr);
                    if (result == null && obj.getInclude() != null)
                        obj = (VersionObject)versions.get(obj.getInclude());
                    else
                        obj = null;
                return result;
    }

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

Maybe you are looking for