Reading xml tag

i'm doing a chat application using smack API and when someone send me a message, i got these words
<message id="PwIG5-6" to="attlzj1@voip1svr1/Smack" from="[email protected]/firestation" type="groupchat"><body>test</body><x xmlns="jabber:x:delay" stamp="20080710T01:26:28" from="[email protected]/firestation"></x></message>
<message id="799l1-50" to="attlzj1@voip1svr1/Smack" from="[email protected]/hssim" type="groupchat"><body>a</body><x xmlns="jabber:x:event"><offline/><delivered/><displayed/><composing/></x><x xmlns="jabber:x:delay" stamp="20080710T01:26:34" from="[email protected]/hssim"></x></message>
<message id="799l1-51" to="attlzj1@voip1svr1/Smack" from="[email protected]/hssim" type="groupchat"><body>dsf</body><x xmlns="jabber:x:event"><offline/><delivered/><displayed/><composing/></x><x xmlns="jabber:x:delay" stamp="20080710T01:28:01" from="[email protected]/hssim"></x></message>
<message id="qoSHJ-5" to="attlzj1@voip1svr1/Smack" from="[email protected]/firestation" type="groupchat"><body>test</body><x xmlns="jabber:x:delay" stamp="20080710T01:28:04" from="[email protected]/firestation"></x></message>
<message id="rFA9O-5" to="attlzj1@voip1svr1/Smack" from="[email protected]/firestation" type="groupchat"><body>test</body><x xmlns="jabber:x:delay" stamp="20080710T01:30:13" from="[email protected]/firestation"></x></message>
i want to get the body and the person who post the message, how should I go about it?

each one looks like xml to me..parse it using DOM or SAX and get the body...simple.. :)
shanu

Similar Messages

  • Problem in reading XML - tags in same line

    Hi All,
    I am using DOM to read XML , my problem is that.I can only read xml entries like folllowing- i.e when tags are in same line only... Please help.
    <src from-page="jsp/Home.jsp"><navigation-case><action>loginaction</action><from-outcome>true</from-outcome><to-page>jsp/WelcomePage.jsp</to-page></navigation-case><navigation-case><action>loginaction</action><from-outcome>false</from-outcome><to-page>jsp/Error.jsp</to-page></navigation-case>
    </src>
    I am not able to read following XML file-
    <src from-page="*">
    <navigation-case>
    <action>logoutaction</action>
    <from-outcome>true</from-outcome>
    <to-page>jsp/Home.jsp</to-page>
    </navigation-case>
    <navigation-case>
    <action>logoutction</action>
    <from-outcome>false</from-outcome>
    <to-page>jsp/Error.jsp</to-page>
    </navigation-case>
    </src>
    Thanks

    Thanks for your response.You are right I am not handling spaces anywhere. How to do that?
    Can you please help in doing this?
    I am posting my code also-
    parser.parse("C:/portal-config.xml");
    org.w3c.dom.Document doc = parser.getDocument();
    org.w3c.dom.NodeList srcList = doc.getElementsByTagName("src");
    for (int i = 0; i < srcList.getLength(); i++) {
    org.w3c.dom.Node sourceNode = srcList.item(i);
    if (sourceNode.getAttributes().getNamedItem("from-page").getNodeValue().equalsIgnoreCase(from)) {
    org.w3c.dom.NodeList navigationCaseList = sourceNode.getChildNodes();
    for (int j = 1; j < navigationCaseList.getLength(); j++) {
    org.w3c.dom.Node navigationCase = navigationCaseList.item(j);
    org.w3c.dom.NodeList childList = navigationCase.getChildNodes();
    System.out.println("node : " + navigationCase.getNodeName());
    System.out.println("list : " + childList.getLength());
    Node action = childList.item(0);
    int type = action.getNodeType();
    // case Node.ELEMENT_NODE :
    System.out.println("node : " + action.getNodeName()+ " "+ action.getNodeValue());
    org.w3c.dom.Node fromOutcome = action.getNextSibling();
    org.w3c.dom.Node toPage = fromOutcome.getNextSibling();
    System.out.println("fromOutcome : " + fromOutcome.getNodeName());
    System.out.println("toPage : " + toPage.getNodeName() + " " + toPage.getNodeType());
    if(action.getNodeType()==1 & fromOutcome.getNodeType()==1 & toPage.getNodeType()==1){
    String actionValue = action.getTextContent();
    String outValue = fromOutcome.getTextContent();
    System.out.println("actionValue : " + actionValue);
    System.out.println("outValue : " + outValue);
    if (actionValue.equalsIgnoreCase(action1) & outValue.equalsIgnoreCase(outcome)) {
    return toPage.getTextContent();
    Seeking your support
    Thanks

  • How to Read XML tags....

    Hi guys...
    Can any one here tell me how to read the XML tag in PL/SQL.
    In table Enquiry there are following fields.
    Id          number
    Status          varchar2(5)
    Request          XML
    Reply          XML
    Error          varchar2(10)
    Now the following XML will be in request column from the requester.
    I have to get the,
    ->request which is in BODY tag,
    ->ID number which is in from tag (its the persons unique ID to check his BILL)
    Fetch the request from the database and updates it into the REPLY field with the same syntax.
    <message>
    <to> 123 </to>
    <from>789</from>
    <body> unbill </body>
    <messagenumber> 01 </messagenumber>
    </message>
    Can any one have the solution to this, how can I read the XML tags, process & again inserts as an XML.
    Thanks.

    Maybe something like this will be a pointer...
    SQL> CREATE TABLE t AS
      2  select 1 as id, 'C' as status, XMLTYPE('<message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>') as request, XMLTYPE('<reply/>') as reply, 'NO ERROR' as error from dual
      3  ;
    Table created.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <reply/>
    NO ERROR
    SQL>
    SQL> UPDATE t
      2  SET reply = updateXML(request,'/message/body/text()','bill')
      3  ;
    1 row updated.
    SQL>
    SQL> SELECT * from t;
            ID S
    REQUEST
    REPLY
    ERROR
             1 C
    <message><to>123</to><from>789</from><body>unbill</body><messagenumber>01</messagenumber></message>
    <message><to>123</to><from>789</from><body>bill</body><messagenumber>01</messagenumber></message>
    NO ERROR
    SQL>

  • Read XML tags

    Hi,
    I have the below XML
    <RESULTS>
    <ROW>
    <COLUMN NAME="ID">12688f8ac8aa6310VgnVCM10000078ccc70a____</COLUMN>
    <COLUMN NAME="BRANCH_NAME">Brooklyn</COLUMN>
    </ROW>
    </RESULTS>
    Could somebody please assist me with a way to read the XML tags alone from this. We do not require the data as such.
    A query on this XML should return
    RESULTS
    ROW
    COLUMN NAME and so on ...
    Regards,
    Jitesh

    forum has many examples
    like Re: multiple xml tag values are not getting in output.
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
    Connected as apps
    SQL>
    SQL> with t as
      2   (select xmltype('<RESULTS>
      3  <ROW>
      4  <COLUMN NAME="ID">12688f8ac8aa6310VgnVCM10000078ccc70a____</COLUMN>
      5  <COLUMN NAME="BRANCH_NAME">Brooklyn</COLUMN>
      6  </ROW>
      7  </RESULTS>') xml
      8      from dual)
      9  select x.*
    10    from t,
    11         xmltable('for $i in $d/descendant::*
    12             return element r {
    13               element tag_name    {local-name($i)}, element tag_name2 {name($i)}
    14            }' passing t.xml as "d" columns tag_name
    15                  varchar2(30) path 'tag_name',
    16                  tag_name2 varchar2(30) path 'tag_name2') x
    17  /
    TAG_NAME                       TAG_NAME2
    RESULTS                        RESULTS
    ROW                            ROW
    COLUMN                         COLUMN
    COLUMN                         COLUMN
    SQL>

  • How to read XML tags in a file, one at a time?

    My file format is:
    <main>
    <section>
    (many tags, some including CDATA)
    </section>
    <section>
    (many tags, some including CDATA)
    </section>
    many more <section>s (over a million)
    </main>
    To avoid reading all the <section>s into memory, how can I read one <section> at a time?
    Thanks in advance.

    sunmhe wrote:
    To avoid reading all the <section>s into memory, how can I read one <section> at a time?If you really want to process huge XML's; you can use SAX or STAX API.

  • Reading xml with streamtokenizer

    Does anyone know how to read xml tags (everthing in between < & >) with streamtokenizer, I can't find any tutorials.

    I recommend xml packages. It's a bit more complex, IMO.

  • Reading XML file generated through XMLGEN

    Hi,
    I have the following problem and I hope someone can give me an advise.
    I generated a simple XML document through the packages XMLGEN.
    This document is stored in a table in CLOB column.
    After this document has been processed (changed) from the web server's ASP pages, I want to read this (changed) XML document (again in the a table in a CLOB)
    to compare it against relational data.
    There is not external DTD or schema of this XML.
    I was thinking to read the elements from the XML/CLOB one-by-one and process them as needed.
    I'm reading already over one week the Oracle manuals, but I can't find any good samples that would help me.
    Does anyone know a nice PL/SQL sample to solve this problem?
    Here is a sample of the XML data:
    >>>>>>>>>
    ?xml version="1.0"?>
    <Subscriber-Detail>
    <Subscriber>
    <Member-ID>0250149556</Member-ID>
    <DIVISION-ID>003</DIVISION-ID>
    <UNIT-ID>004</UNIT-ID>
    <Last-Name>PUBLIC</Last-Name>
    <First-Name>JOE</First-Name>
    <Birthday_DT>29/06/1961</Birthday_DT>
    <Address>2200 PEATON PLACE</Address>
    <City>WOLVERHAMPTON</City>
    <Salary>71500.00</Salary>
    <Smoker_YN>Y</Smoker_YN>
    </Subscriber>
    </Subscriber-Detail>
    <<<<<<<
    Environment: Oracle 9i R2 - no JAVA, pure PL/SQL
    Any help much appreciated.
    TIA
    Thanks
    Fred

    Will these help ?
    How to use PL/SQL to read and manipulate data from a xml file
    How to Read XML tags....

  • How to read an attribute of an xml tag in jsp.

    hi guys,
    This is murali krishna. i have a small problem,
    i have one xml file (books.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <library>
    <book id="1">
    <name>Head First Java, 2nd Edition</name>
    <author>Kathy Sierra and Bert Bates</author>
    <publication-date>09-Feb-2005</publication-date>
    </book>
    <book id="2">
    <name>Effective Java</name>
    <author>Joshua Bloch</author>
    <publication-date>28-May-2008</publication-date>
    </book>
    <book id="3">
    <name>Java How to Program, 7th Edition</name>
    <author>Harvey M. Deitel and Paul J. Deitel</author>
    <publication-date>6-Jan-2007</publication-date>
    </book>
    </library>
    I tried to read this xml file in jsp as shown below
    <%@ page language="java" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="javax.xml.parsers.DocumentBuilder" %>
    <%@ page import="javax.xml.parsers.DocumentBuilderFactory" %>
    <%
    DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
    DocumentBuilder db =dbf.newDocumentBuilder();
    Document doc=db.parse("c:\\books.xml");
    NodeList nl = doc.getElementsByTagName("book");
    %>
    <html>
    <head>
    <title>How to read XML file in JAVA</title>
    </head>
    <body>
    <%
    for(int i=0;i<nl.getLength();i++)
    NodeList nameNlc= doc.getElementsByTagName("name");
    Element nameElements=(Element)nameNlc.item(i);
    String nameTagValue=nameElements.getChildNodes().item(0).getNodeValue();
    NodeList authorNlc= doc.getElementsByTagName("author");
    Element authorElements=(Element)authorNlc.item(i);
    String authorTagValue=authorElements.getChildNodes().item(0).getNodeValue();
    NodeList dateNlc= doc.getElementsByTagName("publication-date");
    Element dateElements=(Element)dateNlc.item(i);
    String dateTagValue=dateElements.getChildNodes().item(0).getNodeValue();
    out.println("name :"+nameTagValue+"<br>");
    out.println("author :"+authorTagValue+"<br>");
    out.println("publication-date :"+dateTagValue+"<br><br>");
    %>
    </body>
    </html>
    so, my problem is I was unable to read the attribute of the tag book , that is "id".
    can any one tell me how to read this "id" attribute.
    Murali Krishna
    [email protected]

    hi,
    U r retriving the elements by tag name.So it just chks the tag name ie.<book> & gives u array of elements.But u need retrive d attribute of <book> tag itself.
    =Solution =====
    Add one more statement ----> var[]= doc.getElementsByName("book");
    Now u hav book elements as an array & can retrive id in for loop
    for(var; var.length;var++)
    doc.element[var].id.value

  • 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:

  • Please help me with the XML tag reading.

    I have an content.xml with thouthand <table:table-row /> tags.
    How can I read the attributes and values of the tag 150 for example?
    Should I read one tag after the other before I reach 150, or there is a shorter way?
    XML Structure of content.xml as example below.
    In this sample I want to get the row4 and its value D4. Of course I don't know what value have the fourth tag and can't search tag with a value D4. I just know that the Row4 contains the value I need.
    Is there any possibility to read the fourth tag, or I should read from the beginning and increase the counter. If the counter is 4, I should read the value. It seems to me not a good approach, because the files can contain thousands of tags and for each value to go throught the whole xml is resource-intensive.
    <table:table table:name="Sheet1" table:style-
    name="ta1" table:print="false">
    <table:table-column table:style-name="co1" table:
    number-columns-repeated="7" table:default-cell-
    style-name="Default"/>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C1</text:p>
    </table:table-cell>
    <text:p>D1</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C2</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>E2</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C3</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="4"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B4</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>D4</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    <table:table-cell office:value-type="string">
    <text:p>E5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1" table:number-rows-repeated="2">
    <table:table-cell table:number-columns-repeated="7"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell table:number-columns-repeated="4"/>
    <table:table-cell office:value-type="string">
    <text:p>E8</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>G8</text:p>
    </table:table-cell>
    </table:table-row>
    </table:table>

    Thanks for the answer.
    And is there any possibility to get the tag with the value 5. I know that the fifth tag should contain the value I want, in this case 5. But there is an attribute, and if this attribute is not null, then some tags1 can be shifted so that the third tag1 have an attribute tags=2, so I know that there is no the fourth tag and I read the next tag as fifth (with XPath doc/tag[4]).
    Should I read all tags, or there is some other way with the XPath. To search for the first tag with attributes and if its position before the fifth tag, than to decrease the tag-position counter and so on.
    <doc>
    <tag1>1</tag1>
    <tag1>2</tag1>
    <tag1 tags=2>3</tag1>
    <tag1>5</tag1>
    <tag1>6</tag1>
    </doc>Thanks in advance.

  • How to parse xml file to read the tags

    Hi All,
    I am having a requirement to read the tags from the xml file(xml parsing).
    The main issue is *xml file is stored in the table with xml type column* (not placed directly in the server) and we have to read the tags from that xml file.
    Please help me to achieve it.
    Regards,
    Akshata
    Edited by: Akshata on Mar 21, 2013 3:44 AM

    Hi,
    Akshata wrote:
    The main issue is xml file is stored in the table clob/blob type column (not placed directly in the server) and we have to read the tags from that xml file.How is that an issue? On the contrary, it's better when the data already resides in the database, though it should be in an XMLType column to leverage the full capacity of the Oracle parser.
    What's the datatype of the column exactly? CLOB or BLOB?
    Either way you'll have to convert in to XMLType datatype using the XMLType constructor.
    Did you go through the countless examples on this forum? Examples with XMLTable should be helpful.
    Post some sample data and database version if you need additional guidance.
    Thanks.

  • How to read duplicate XML tag?

    Hi to all gurus,
    Currently I am working on XSLT transformation. I encountered a problem when I have to read a random number of xml tag with the same names.
    sample:
    <product_code_list>
    <product_code>12345</product_code>
    <product_code>12333</product_code>
    <product_code>12233</product_code>
    </product_code_list>
    My xslt can only manage to read the 1st row. How can it be possible to read all the 3 rows?
    xslt:
    <product_code_list>
    <xsl:for each select-value-of='product_code_list'>
    <product_code_list1>
    <product_code><xsl: select-value-of ='product_code'></product_code>
    </product_code_list1>
    </xsl:for each>
    </product_code_list>
    Many thanks in advance for reading this. Please assist to solve this. Point will be generously awarded!

    Hi Mr Raja!
    Thanks again for your help. I felt so embarrassed.
    The product is produced from another source dynamically. Hence the list can contain from 1 to any number of products.
    I tried to use the for-each but another problem arise. the structure is created for the products, but it is all empty inside when i used the debugger to go through the code.
    TYPES:
    TPRODUCT(10) OCCURS 0,
    BEGIN OF PRODUCT_LIST,
      PRODUCT TYPE TPRODUCT,
    END OF PRODUCT_LIST,
    PL TYPE PRODUCT_LIST OCCURS 0.
    DATA:
    VENDOR TYPE STANDARD TABLE OF PRODUCT_LIST INITIAL SIZE 0,
    XML_STRING TYPE STRING,
    xslt_error     TYPE REF TO     cx_xslt_exception,
    xslt_message     TYPE     string.
    CLEAR xml_string .
    CONCATENATE
    `<myXML>`
    `<PRODUCT_LIST>`
    `<PRODUCT>12345</PRODUCT>`
    `<PRODUCT>12333</PRODUCT>`
    `<PRODUCT>62233</PRODUCT>`
    `</PRODUCT_LIST>`
    `</myXML>`
    INTO XML_STRING.
    CLEAR VENDOR.
    TRY.
          CALL TRANSFORMATION ('ZTESTCHINXSLT')
          SOURCE XML XML_STRING
          RESULT VENDOR = VENDOR.
        CATCH
        cx_xslt_exception INTO xslt_error.
          xslt_message = xslt_error->get_text( ).
      ENDTRY.
    XSLT:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/abapxml" version="1.0">
    <xsl:template match="/">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml">
    <asx:values>
    <xsl:for-each select="myXML">
    <VENDOR>
    <xsl:for-each select="PRODUCT_LIST">
    <PRODUCT_LIST1>
    <PRODUCT>
    <xsl:for-each select="PRODUCT">
    <P>
    <xsl:value-of select="PRODUCT"/>
    </P>
    </xsl:for-each>  
    </PRODUCT>
    </PRODUCT_LIST1>   
    </xsl:for-each>
    </VENDOR>
    </xsl:for-each>   
    </asx:values>
    </asx:abap>
    </xsl:template>
    </xsl:transform>
    Message was edited by:
            swee chin

  • Read a word embedded in xml tag

    Hi everyone...
    i am an university student. i am doing a final year project.....dealing with program
    i want to ask how to read a word embedded in xml tag...
    that is e.g apple
    xml file: <fruit> apple </fruit>
    <price>$4.00</price>
    how to read apple from xml file and using a variable to store the word using java?
    pls help.....

    If you want to parse XML (more than the simple example you give), I recommend you go here: http://xml.apache.org and download Xerces for Java.
    If you want to parse the text yourself, look at:
    java.lang.String methods: indexOf(String,int) and substring(int,int)
    java.util.StringTokenizer

  • Read XML root element tag in Java

    Is there any way I can read the tag of the root element? Based on the tag, I process the XML differently.
    Thank you.

    I think I figured it out. I can accomplish this by using the getTagName method. Sorry for the lack of detail in my original question.
    For those interested, I have a class that has XML passed to it. Depending on what the root tag name is, different activities needed to take place. I needed a way to read the tag in order to determine what actions needed to be performed.
    Thank you.

  • How to read content between xml tags?

    is there any way to read the content between xml tag

    > is there any way to read the content between xml tag
    Yes. Are you having some sort of problem? If so, please be a little more explicit about what you're doing, what you expect to happen, and what you actually observe.
    Please post a short, concise, executable example of what you're trying to do. Don't post the actual code you are using (I can't emphasize this strongly enough). Just write a small example that demonstrates the problem, and only that. Wrap the code in a class and give it a main method that runs it - if we can just copy and paste the code into a text file, compile it and run it without any changes, then we can be sure that we haven't made incorrect assumptions about how you are using it.
    Post your code between [code] and [/code] tags. Cut and paste the code, rather than re-typing it (re-typing often introduces subtle errors that make your problem difficult to troubleshoot). Please preview your post when posting code.
    Please assume that we only have the core API. We have no idea what SomeCustomClass is, and neither does our collective compiler.
    If you have an error message, post the exact, complete error along with a full stack trace, if possible. Make sure you're not swallowing any Exceptions.
    Help us help you solve your problem.
    ~

Maybe you are looking for

  • How do i change an old email address on apple tv to the new one?

    Greetings my apple tv is 2 years old. my old email address reflected in it.  i never hooked it up until yesterday. how do i delete the old email to the new one so i can sync with Itunes?  i changed my apple ID but still it didnt take. Scout23

  • Problem with Business partner flow from R/3  to CRM

    Hi, We are setting up a process to flow of Business Partners from R/3 to CRM.  We have configured PIDE correctly but the problem is when I am creating any customer in R/3 we are getting DUMP.   Kindly help me in this regards. Thanks

  • Enabling / Disabling a field on a Form

    Hi, I would like to enable a field for user input query value, but once the data is returned to the form, I want to disable that field so that it cannot be editable. (i.e. it is the PK for that table). Anyone has any suggestions / Ideas. Thanks Srini

  • Program for debugging webpage

    Hey all, my webpage takes forever to load, whenever i edit this certain file it always puts a bug in the page, something about CSS code which i never put in there in the first place, but after all it makes my page take forever to load, so i am wonder

  • ABAP program for sending emails

    Hello SAP developers, I need ABAP program for sending emails to my internet adress in background - just some simple header with no body and no attachement. Recipient should be specified due the parameter etc... Does program like this exist or i have