Help: Using XML to format Java output

I built an application that uses an SQL DB (uses HSQLDB). Users are prompted to enter data via the keyboard to store in the tables.
The users must be able to query the database as well, to see what is in the tables.
My aim is to use XML to show the results of the query, so that it is formatted nicely.
However, I am new to this and not sure how to start putting in the XML tags etc. I think I know which part of the code to modify. This is the part that does the displaying.
      * Ouptut the contents of a recordset to the console with
      * the column names from the tables
      * @param rs the ResultSet to display
     public static void print(ResultSet rs) throws SQLException {
          ResultSetMetaData meta   = rs.getMetaData();
             int               colmax = meta.getColumnCount();
             int               i;
             Object            o       = null;
          String coln            = meta.getColumnName(1);     
             for (;rs.next();) {
                 for (i = 0; i < colmax; ++i) {
                o = rs.getObject(i + 1);// Is SQL the first column is indexed
          coln = meta.getColumnName(i+1);                  
                                            // with 1 not 0
          System.out.println(coln +":"+'\t'+ o.toString() + " ");
            System.out.println(" ");
}Can anyone give me any guidance or just a hint for me to start?
Thank you very much.

Using DOM would probably be the easiest solution, though not fast enough for your problem, as many records might come out of the RS...
So if performance is an issue, try producing XML with SAX (read the excellent Dr.Clap tips here: http://forum.java.sun.com/thread.jsp?forum=34&thread=326617)
Else use DOM: chapter 7 here: http://java.sun.com/webservices/docs/1.1/tutorial/doc/index.html

Similar Messages

  • How to use XML / XPath in JAVA (in 1.4) which third part component to use?

    How to use XML / XPath in JAVA (in 1.4)
    I'm absolutely novice in XML
    but I need to query XML using XPath
    As I understand XPath become avalible only in Java 1.5
    But I use 1.4 (project requirement)
    Which third part component could you recomend?

    Can anyone help me with this XPath query
    I get result [title: null]
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.jaxen.*;
    import org.jaxen.dom.*;
    import org.jaxen.saxpath.*;
    import java.util.*;
    public class TestX {
         public void ggg() {
              try {
                   File f = new File("journal.xml");
                   DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                   org.w3c.dom.Document doc = docBuilder.parse(f);
                   XPath xpath = new DOMXPath( "/journal/article/title" );
                   List result = (List) xpath.evaluate(doc);
                   System.out.println(result.get(0));
              } catch (Exception e) {
                       e.printStackTrace();
         public static void main(String[] args) {
              TestX tx = new TestX();
              tx.ggg();
    }journal.xml
    <journal>
        <article id="article.1">
            <title>Art1</title>
            <author>
               <first>Bob</first>
               <last>McWhirter</last>
            </author>
            <text>
            </text>
        </article>
        <article id="article.2">
            <title>Art2</title>
            <author>
               <first>James</first>
               <last>Strachan</last>
            </author>
            <text>
            </text>
        </article>
    </journal>

  • CrystalReports Subreports Demo Using XML As DataSource , Java As Tool

    Hello,
        Im New to CrystalReports.Can any one send me (or) explain me Regarding "CrystalReports Subreports Demo Using XML As DataSource , Java As Tool" .
    Thanks,
    RadhaKrishna K

    ok

  • Generation of Xml file with java output

    Hi i m new to xml and java combination. I have a name value pair kind of output returning from java program. I want to generate the new xml file with the data. Could some one help me out in generating xml file with the data. Could anyone send me the java code that does this task.

    Let me know which parser are you using currently for reading xml files so that i assist you. For now, you can refer to STAX Parser API under this link
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP3.html

  • Using XML file in Java script to create Google Map

    Hello,
    I work for a non-profit in San Diego as a GIS Specialist. I have had to teach myself about some scripting to create some dynamic maps, but I am still very limited in my skills, so I have had to explore the internet in order to discover various tutorials and examples that have led me on a positive path.
    Right now I am working on a Google Mash-Up that will incorporate over 14,000 records, which will appear as separate markers that will have pop-up info bubbles with additional info inside (using html), once the marker is clicked.
    Here is the XML script example that is used in the tutorial I am following:
    <markers>
    <marker lat="43.65654" lng="-79.90138" html="Some stuff to display in the<br>First Info Window"
    label="Marker One" />
    <marker lat="43.91892" lng="-78.89231" html="Some stuff to display in the<br>Second Info Window"
    label="Marker Two" />
    <marker lat="43.82589" lng="-79.10040" html="Some stuff to display in the<br>Third Info Window"
    label="Marker Three" />
    </markers>
    ...and this is how it looks when the file is retrieved by the java script and mapped: http://econym.googlepages.com/example_map3.htm
    This is the java script that creates the Google Map. I have emboldened the section of the script that retrieves the data and parses it to create the markers:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Google Maps</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6GoL8P5zqjQlG5A5uM1ETBSUPozAscB0cY3RG8xEGnZyeom4axRySak889rVpvHYRsV4f9OZZzbboA"
    type="text/javascript"></script>
    </head>
    <body onunload="GUnload()">
    <!-- you can use tables or divs for the overall layout -->
    <table border=1>
    <tr>
    <td>
    <div id="map" style="width: 800px; height: 1200px"></div>
    </td>
    <td width = 200 valign="top" style="text-decoration: underline; color: #4444ff;">
    <div id="side_bar"></div>
    </td>
    </tr>
    </table>
    <noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
    However, it seems JavaScript is either disabled or not supported by your browser.
    To view Google Maps, enable JavaScript by changing your browser options, and then
    try again.
    </noscript>
    <script type="text/javascript">
    //<![CDATA[
    if (GBrowserIsCompatible()) {
    // this variable will collect the html which will eventualkly be placed in the side_bar
    var side_bar_html = "";
    // arrays to hold copies of the markers used by the side_bar
    // because the function closure trick doesnt work there
    var gmarkers = [];
    var i = 0;
    // A function to create the marker and set up the event window
    function createMarker(point,name,html) {
    var marker = new GMarker(point);
    GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
    // save the info we need to use later for the side_bar
    gmarkers[i] = marker;
    // add a line to the side_bar html
    side_bar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
    i++;
    return marker;
    // This function picks up the click and opens the corresponding info window
    function myclick(i) {
    GEvent.trigger(gmarkers, "click");
    // create the map
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng( 37.251699,-119.604315), 7);
    *// Read the data from testXML2blackpoolformat.xml*
    var request = GXmlHttp.create();
    request.open("GET", "testXML2blackpoolformat.xml", true);
    *request.onreadystatechange = function() {*
    *if (request.readyState == 4) {*
    var xmlDoc = GXml.parse(request.responseText);
    *// obtain the array of markers and loop through it*
    var markers = xmlDoc.documentElement.getElementsByTagName("ConnectoryRecord");
    *for (var i = 0; i < markers.length; i++) {*
    *// obtain the attribues of each marker*
    *var lat = parseFloat(markers[i].getAttribute("lat"));*
    *var lng = parseFloat(markers[i].getAttribute("lng"));*
    var point = new GLatLng(lat,lng);
    *var html = markers[i].getAttribute("html");*
    *var label = markers[i].getAttribute("label");*
    *// create the marker*
    var marker = createMarker(point,label,html);
    map.addOverlay(marker);
    // put the assembled side_bar_html contents into the side_bar div
    document.getElementById("side_bar").innerHTML = side_bar_html;
    request.send(null);
    else {
    alert("Sorry, the Google Maps API is not compatible with this browser");
    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/
    // http://econym.googlepages.com/index.htm
    //]]>
    </script>
    </body>
    </html>
    Here is my delima--
    This is the xml format that I need to use because it can accept the rest of my excel file and loop it through the 14,000+ records to create a functioning xml file. This is just a sample (2 records) of the larger file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <ConnectoryAug2008>
    <ConnectoryRecord>
         <lng>-117.03683</lng>
         <lat>32.944505</lat>
         <ConnectoryID>1</ConnectoryID>
         <Name>$2.95 Guys</Name>
         <StreetAddress>13750 Stowe Drive</StreetAddress>
         <City>Poway</City>
         <State>CA</State>
         <Zip>92064</Zip>
    <Marker>White</Marker>
         <IndustryGroup>Technical Services</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=1</ConnectoryProfileLink>
    </ConnectoryRecord>
    <ConnectoryRecord>
         <lng>-117.272843</lng>
         <lat>33.13337</lat>
         <ConnectoryID>2</ConnectoryID>
         <Name>(GLDS) Great Lakes Data Systems</Name>
         <StreetAddress>5954 Priestly Drive</StreetAddress>
         <City>Carlsbad</City>
         <State>CA</State>
         <Zip>92008</Zip>
    <Marker>Orange</Marker>
         <IndustryGroup>Technology</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
    </ConnectoryRecord>
    </ConnectoryAug2008>
    This is the tutorial where I found the formatting techniques to successfully create the large xml file that will format/convert my excel file properly: http://www.mrexcel.com/tip064.shtml
    These variables should appear as html in the info bubble:
    <ConnectoryID>2</ConnectoryID>
         <Name>(GLDS) Great Lakes Data Systems</Name>
         <StreetAddress>5954 Priestly Drive</StreetAddress>
         <City>Carlsbad</City>
         <State>CA</State>
         <Zip>92008</Zip>
    <IndustryGroup>Technology</IndustryGroup>
         <ConnectoryProfileLink>http://connectory.com/search/profile_view.aspx?connectoryId=2</ConnectoryProfileLink>
    The "Marker" variable instructs Google Maps to label the marker with a particular color. I will be so grateful to the person(s) that helps me get through this wall that I have been hitting for a long time. It's very difficult without having the luxury of peers who know about these types of issues.
    Thank you!!

    Here is the relationship: They both contain geographic coordinates that produce a point on a map. I will use the rest of the information in the second xml file (company name, address, link, etc.) to produce the information for the bubble that will pop up once the marker is clicked.
    My problem is that I need to try to keep the second xml file in a relatively similar format, so the rest of my records will still be accepted. If I had a smaller amount of records I could place them directly into the javascript, but because there are so many records, I need to use an xml file that can be retrieved by the java script. I chose to use the second type of xml file because I can easily copy and past the 14,000+ records that are now in excel document.
    After the xml issue is corrected I need to rework the javascript that is now emboldened so that it will read the new xml file correctly. I included the first xml file so that the readers will understand what type of xml format is currently being used to produce the markers in the tutorial map.

  • Help-using document as a java swing component

    Hi,
    can i use a document excel file or a doc file as a swing component.
    i have few templates in in excel and .doc format.
    i use them to produce bills by just entering data.
    Now i want to develop a swing application and use the same templates in jpanel or jtextpane or jeditorpane.
    its very hectic to make templates in swing using tables and all.
    is there any api which can help me out???
    thanks

    as a Swing component? No.
    There's probably libraries for reading those types of files, and maybe displaying them. POI, perhaps?

  • Using XML parser in Java

    Hi,
    I would like to distribute the Java XML parser with my product (which does not include an Oracle database).
    Do you have an idea, if this can be done ?
    The license agreement is "for a single developer". My local reseller has no clue if I can use for free, or how much does it cost.
    Any idea ?

    Free runtime redistribution. visit the latest download page for the production version to see the verbage.

  • Help Using SQL*Plus Format Commands (like TTITLE) in Packages

    Where (within a package) can/should SQL*Plus format commands such as TTITLE, COLUMN & BREAK be coded?

    A package is coded in PL/SQL.
    TTITLE, COLUMN and BREAK are SQL*Plus commands, they cannot be used in PL/SQL.
    If you want to output data (using dbms_output) in your package, you'll have to implement the features yourself. But probably just using SQL*Plus is better in your case.
    Regards,
    Rob.

  • Using xml file in java application

    How can i get the attribute name & value into my java application from a xml flie?

    read the file
    parse the contents
    store attribute name & value pairs.
    %

  • Help using XML as Dictionary key

    I'm not quite understanding the key in Dictionaries. I thought if the same key was passed twice it would still only create one pair in the dictionary. Can anyone explain this to me?
    With a key of a string or number it seems to work as I would expect, but the XML as key doesn't seem to work. The line in there that changes the title was just to check if the XML was being passed as a reference or value. It is a reference. So it seems like the dictionary should know the key is the same. Why doesn't it?
    I'm trying to create an index of the content in some XML Nodes and want to be sure that various nodes don't get added to the index more than once. I also My thinking was to use the XML node itself as as the key. It is the only thing I have in the data that is for sure unique. Is there a way to do what I want to do?
    var xmlData:XML=<data>
    <session>
    <title>Document 1</title>
    <desc> <![CDATA[blah blah blah]]></desc>
    </session>
    <session>
    <title>Document 2</title>
    <desc> <![CDATA[blah blah blah]]></desc>
    </session>
    </data>;
    var d:Dictionary=new Dictionary();
    var xml1:XML=xmlData.session[0];
    var xml2:XML=xmlData.session[0];
    addToDictionary(xml1);
    addToDictionary(xml2);
    xmlData.session[0].title="New title";
    for(var a:* in d){
              trace(a.title+": "+d[a]);
    function addToDictionary(xml:XML){
              d[xml]=int(Math.random()*500);
    traces
    New title: 2
    New title: 135

    If I change the assigment to:
    var xml1:XML=xmlData.session[0];
    var xml2:XML=xml1;
    addToDictionary(xml1);
    addToDictionary(xml2);
    Then it does work as I had hoped it might. In any event...
    I'm trying to make a (forward) index of some properties of each node in an XML—total word count, frequency of each word, etc. So later when my reverse index returns several XMLs I can quickly look up those data and compute a tf-idf for relevance ranking.
    I'm thinking the conversion toString() will slow the whole thing down? I'll give it a look-see.

  • Need php help using xml sendandload

    info:
    var bc_xml:XML = new XML(email);
    var email:String =
    "<email>[email protected]</email>";
    bc_xml.sendAndLoad(bc_url, bc_xml, "POST");
    how do i put the [email protected] into a php variable?

    1. Syntax for sendAndLoad is not correct.
    You might want to review that and the example in the Docs
    http://livedocs.macromedia.com/flash/8/main/00002879.html
    The syntax is correct however for the loadVars class.
    2. The order for this is incorrect:
    var bc_xml:XML = new XML(email);
    var email:String =
    "<email>[email protected]</email>";
    You need to declare a variable before you use it, in this
    case the email
    variable is declared and initialized after you used it.
    3. In PHP I use
    $xmlRequest = file_get_contents("php://input");
    Then you can use the xml parser in PHP or parse yourself or
    use another
    party's parser.
    Here is a simple round trip example I use in courses:
    http://www.hosfordusa.com/ClickSystems/courses/flash/examples/XMLPHP/EX01/XMLPHPEchoEx01_D oc.php
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "ck1mark" <[email protected]> wrote in
    message
    news:e1s3bn$23f$[email protected]..
    info:
    var bc_xml:XML = new XML(email);
    var email:String =
    "<email>[email protected]</email>";
    bc_xml.sendAndLoad(bc_url, bc_xml, "POST");
    how do i put the [email protected] into a php variable?

  • F4 help using standard FM , to restrict output

    Hi Gurus , I am using a standard FM CBIH_LB22_PHRASE_VALUE_REQUEST to display F4 help. This returns the following screen
    Phrase key                   Phrase text
    AAAA                          desc1
    BBBB                          desc 2
    CCCC                           desc3
    I however want to only show the phrase text . How can I achieve this.
    Thank you

    Hi ,
    Is there an eaiser way to control it from the function call. This function actually calls its own screen

  • Help using Nik Sharpener Pro for output to Aperture Book...

    I wonder if anyone knows what printers Apple uses in the U.S. for Aperture book printing. 'Googling' leads me to think that they are 'digital' but I don't know how to translate that for the settings in Sharpener Pro.
    Or is there a prescribed way to sharpen (with general setting info) in Aperture itself. I know how to sharpen in Aperture (3.4.3) but don't know what is the right method for images destined for a book.
    My images are almost all portraits, and close-ups specifically, so eyes are particularly important.
    I have spent a lot of time trying to find help with this online. My two Aperture books say nothing.
    Any other advice for optimizing the results would be most appreciated.
    Thanks...

    Thank you for this! I hope it helps (the best info so far)  but I wish that someone from Apple would update for all of us the specs of the printers that they are using now (four years later than the discussion referenced).

  • XML generation with SAP data using XML schema - Reg

    Hello experts,
      My requirement is , SAP( ztable data )  data has to be transferred to third party software folder.Third party using XML so they requires output from SAP in XML format.
    For that third party software guys told me that they will give their own XML schema to me.I have to generate XML file with SAP data using their XML schema.
    Generating XML file with their Schema should be underlined.
    I studied that call transformation statement helps for this.
    Even then i don't have clear idea about this topic.
    Please brief me about how to use their XML schema to generate XML with my own sap data.
    Thanks in advance experts.
    Kumar

    please  try this  same program    and see  it ....
    *& Report  z_xit_xml_check
      REPORT  z_xit_xml_check.
      TYPE-POOLS: ixml.
      TYPES: BEGIN OF t_xml_line,
              data(256) TYPE x,
            END OF t_xml_line.
      DATA: l_ixml            TYPE REF TO if_ixml,
            l_streamfactory   TYPE REF TO if_ixml_stream_factory,
            l_parser          TYPE REF TO if_ixml_parser,
            l_istream         TYPE REF TO if_ixml_istream,
            l_document        TYPE REF TO if_ixml_document,
            l_node            TYPE REF TO if_ixml_node,
            l_xmldata         TYPE string.
      DATA: l_elem            TYPE REF TO if_ixml_element,
            l_root_node       TYPE REF TO if_ixml_node,
            l_next_node       TYPE REF TO if_ixml_node,
            l_name            TYPE string,
            l_iterator        TYPE REF TO if_ixml_node_iterator.
      DATA: l_xml_table       TYPE TABLE OF t_xml_line,
            l_xml_line        TYPE t_xml_line,
            l_xml_table_size  TYPE i.
      DATA: l_filename        TYPE string.
      PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:temporders_dtd.xml'.
    * Validation of XML file: Only DTD included in xml document is supported
      PARAMETERS: pa_val  TYPE char1 AS CHECKBOX.
      START-OF-SELECTION.
    *   Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
    *   Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    *   wrap the table containing the file into a stream
        l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
                                                        size  = l_xml_table_size ).
    *   Creating a document
        l_document = l_ixml->create_document( ).
    *   Create a Parser
        l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
                                          istream        = l_istream
                                          document       = l_document ).
    *   Validate a document
        IF pa_val EQ 'X'.
          l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
        ENDIF.
    *   Parse the stream
        IF l_parser->parse( ) NE 0.
          IF l_parser->num_errors( ) NE 0.
            DATA: parseerror TYPE REF TO if_ixml_parse_error,
                  str        TYPE string,
                  i          TYPE i,
                  count      TYPE i,
                  index      TYPE i.
            count = l_parser->num_errors( ).
            WRITE: count, ' parse errors have occured:'.
            index = 0.
            WHILE index < count.
              parseerror = l_parser->get_error( index = index ).
              i = parseerror->get_line( ).
              WRITE: 'line: ', i.
              i = parseerror->get_column( ).
              WRITE: 'column: ', i.
              str = parseerror->get_reason( ).
              WRITE: str.
              index = index + 1.
            ENDWHILE.
          ENDIF.
        ENDIF.
    *   Process the document
        IF l_parser->is_dom_generating( ) EQ 'X'.
          PERFORM process_dom USING l_document.
        ENDIF.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
    *   Local variable declaration
        DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce,
              l_itab     TYPE TABLE OF string.
        l_filename = pa_file.
    *   upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *   Writing the XML document to the screen
        CLEAR l_str1.
        LOOP AT l_xml_table INTO l_xml_line.
          c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space  ).
          c_conv->read( IMPORTING data = l_content len = l_len ).
          CONCATENATE l_str1 l_content INTO l_str1.
        ENDLOOP.
        l_str1 = l_str1+0(l_xml_table_size).
        SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
        WRITE: /.
        WRITE: /' XML File'.
        WRITE: /.
        LOOP AT l_itab INTO l_str1.
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
            l_str1 WITH space.
          WRITE: / l_str1.
        ENDLOOP.
        WRITE: /.
      ENDFORM.                    "get_xml_table
    *&      Form  process_dom
      FORM process_dom USING document TYPE REF TO if_ixml_document.
        DATA: node      TYPE REF TO if_ixml_node,
              iterator  TYPE REF TO if_ixml_node_iterator,
              nodemap   TYPE REF TO if_ixml_named_node_map,
              attr      TYPE REF TO if_ixml_node,
              name      TYPE string,
              prefix    TYPE string,
              value     TYPE string,
              indent    TYPE i,
              count     TYPE i,
              index     TYPE i.
        node ?= document.
        CHECK NOT node IS INITIAL.
        ULINE.
        WRITE: /.
        WRITE: /' DOM-TREE'.
        WRITE: /.
        IF node IS INITIAL. EXIT. ENDIF.
    *   create a node iterator
        iterator  = node->create_iterator( ).
    *   get current node
        node = iterator->get_next( ).
    *   loop over all nodes
        WHILE NOT node IS INITIAL.
          indent = node->get_height( ) * 2.
          indent = indent + 20.
          CASE node->get_type( ).
            WHEN if_ixml_node=>co_node_element.
    *         element node
              name    = node->get_name( ).
              nodemap = node->get_attributes( ).
              WRITE: / 'ELEMENT  :'.
              WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
              IF NOT nodemap IS INITIAL.
    *           attributes
                count = nodemap->get_length( ).
                DO count TIMES.
                  index  = sy-index - 1.
                  attr   = nodemap->get_item( index ).
                  name   = attr->get_name( ).
                  prefix = attr->get_namespace_prefix( ).
                  value  = attr->get_value( ).
                  WRITE: / 'ATTRIBUTE:'.
                  WRITE: AT indent name  COLOR COL_HEADING INVERSE, '=',
                                   value COLOR COL_TOTAL   INVERSE.
                ENDDO.
              ENDIF.
            WHEN if_ixml_node=>co_node_text OR
                 if_ixml_node=>co_node_cdata_section.
    *         text node
              value  = node->get_value( ).
              WRITE: / 'VALUE     :'.
              WRITE: AT indent value COLOR COL_GROUP INVERSE.
          ENDCASE.
    *     advance to next node
          node = iterator->get_next( ).
        ENDWHILE.
      ENDFORM.                    "process_dom
    reward  points  if it is use fulll ....
    Girish

  • How to format sqlplus output

    In previous OTN Forum format we used {code} to format sqlplus output , how to do in this version ?

    Click on "Use Advanced Editor".
    Highlight your code.
    Click on the symbol >>
    Select Syntax Highlighting
    Select SQL...output looks like below:
    select sysdate from dual;

Maybe you are looking for

  • Design View Not Rendering

    Before anyone forwards me to another site I want you to know that I've been to several and none of them have solved my problem. My problem is the design view is not rendering. I get the "Type, paste, or drag..." message in the viewer. I have tried al

  • Problem in F4 help in ALV

    Hi, I have 2 fields Partner function and Partner in my ALV grid display. Partner function is a drop down box and i have set F4 help for Partner based on input in Partner function field. The problem i'm facing is as below, I select Partner function e.

  • InDesign CS5 Crashes when attempting to open on Mac

    Aloha!  I wasn't able to find what I was looking for in the threads.  I can not get InDesign to open on my iMac.   It keeps crashing every time I try to open the program. I'm not a tech person, so please dumb it down for me.  Thanks.

  • Creating Transaction Type for linking to Payment Method

    Hi All I need to new transaction type and link it to Payment Methods. I am able to figure out that it can be linked through T code OBBB. however i need to have more transaction type option in second column to serve my purpose. Can you please let me k

  • Looking for interview questions

    hi all, i m looking interview questions can anyone plzz help me find it. thanks ...