Transforming certain elements of xml-doc to bytearray representing xml?

I have a xml-file like this.
<?xml version="1.0" encoding="UTF-8"?>
<Family>
     <Person>
              <Name>Suzy</Name>
          <Nick>Mom</Nick>
       </Person
     <Person>
              <Name>Pete</Name>
          <Nick>Dad</Nick>
     </Person>
</Family>I am interested in fetching all the Person-elments, make them into separate xml-document like this.
<?xml version="1.0" encoding="UTF-8"?>
<Person>
         <Name>Suzy</Name>
     <Nick>Mom</Nick>
</PersonThe Person-elements are collected using JDOM (ElementFilter("Person")). Afterwords I want to transform the xml-documents to byte arrays. The xml-documents shall never be written to file.
I am a bit sure on how to procede after I have fetched the Person-elements. I want them into an xml-document, and then I think convert the documents to a bytearray?
Does anyone have suggestions on how to get this done:
1) How to make each of the elements into a xml-document?
2) How to get the xml-document to a byte-array, via a String?
And, does this approach sound crazy, is there an obvious solution I am not seeing?

No, generally, serialization means outputting to a network or file or database (e.g., going from object to stream). There is java.io.Serializable which serializes to Java's custom format. However, you can also serialize out as XML.
public final class DomSerializer extends Object {
     // Class Variables //
     private static final TransformerFactory factory;
     // Constructors //
     static {
          try {
               factory = TransformerFactory.newInstance();
          catch (TransformerFactoryConfigurationError fatal) {
               throw new ConfigurationError("Unable to create XSLT transformer factory", fatal);
     private DomSerializer() {
          super();
     // Public Methods //
     public static final void serialize(final Document target, final OutputStream out) {
          Transformer transformer = createTransformer();
          try {
               transformer.setOutputProperty(OutputKeys.INDENT, "yes");
               transformer.transform(new DOMSource(target), new StreamResult(out));
          catch (TransformerException e) {
               throw new SerializationError("Error serializing DOM document", e);
     public static final String serialize(final Document target) {
          ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
          serialize(target, byteOut);
          return new String(byteOut.toByteArray());
     // Private Methods //
     private static Transformer createTransformer() {
          try {
               Transformer transformer = factory.newTransformer();
               transformer.setOutputProperty(OutputKeys.INDENT, "Yes");
               return transformer;
          catch (TransformerConfigurationException fatal) {
               throw new ConfigurationError("Unable to create a new XSLT transformer", fatal);
}

Similar Messages

  • Reading XML file and skip certain elements/attributes??

    Hi folks!
    Suppose I have a XML file looking like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE dvds SYSTEM "DTDtest.dtd">
    <dvds>
    <dvd>
    <title>
    Aliens
    </title>
    <director>
    James Cameron
    </director>
    <format>
    1.85:1
    </format>
    </dvd>
    <dvd>
    <title>
    X-Men
    </title>
    <director>
    Bryan Singer
    </director>
    <format>
    2.35:1
    </format>
    </dvd>
    </dvds>
    In my Java application I want to read this XML file and print it on the screen (including all tags etc). So far, so good. BUT, if I want to skip certain elements, i.e. all information about the dvd 'X-Men', how am I supposed to do this? In other words, I would like my app to skip reading all information about X-Men and continue with the next <dvd>... </dvd> tag. Is this possible?
    My code so far is from the XML tutorial from Sun and it looks like this:
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class MyXML extends DefaultHandler
    public static void main(String argv[]) {
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    DefaultHandler handler = new MyXML();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler);
    } catch (Throwable t) {
    t.printStackTrace();
    System.exit(0);
    static private Writer out;
    //===========================================================
    // SAX DocumentHandler methods
    //===========================================================
    public void startDocument()
    throws SAXException
    emit("<?xml version='1.0' encoding='UTF-8'?>");
    nl();
    public void endDocument()
    throws SAXException
    try {
    nl();
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    * <p>This method prints the start elements including attr.
    * @param namespaceURI
    * @param lName
    * @param qName
    * @param attrs
    * @throws SAXException
    public void startElement(String namespaceURI,
    String lName, // local name
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
    String eName = lName; // element name
    if ("".equals(eName)) eName = qName; // namespaceAware = false
    emit("<"+eName);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength(); i++) {
    String aName = attrs.getLocalName(i); // Attr name
    if ("".equals(aName)) aName = attrs.getQName(i);
    emit(" ");
    emit(aName+"=\""+attrs.getValue(i)+"\"");
    emit(">");
    public void endElement(String namespaceURI,
    String sName, // simple name
    String qName // qualified name
    throws SAXException
    emit("</"+qName+">");
    * <p>This method prints the data between 'tags'
    * @param buf
    * @param offset
    * @param len
    * @throws SAXException
    public void characters(char buf[], int offset, int len)
    throws SAXException
    String s = new String(buf, offset, len);
    emit(s);
    //===========================================================
    // Utility Methods ...
    //===========================================================
    // Wrap I/O exceptions in SAX exceptions, to
    // suit handler signature requirements
    private void emit(String s)
    throws SAXException
    try {
    out.write(s);
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    // Start a new line
    private void nl()
    throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    out.write(lineEnd);
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    Sorry about the long listing... :)
    Best regards
    /Paul

    A possibility that comes to mind is to create an XSLT script to do whatever it is you want - and call it from inside the program. The XSLT script can be stashed inside your .jar file by using getClass().getClassLoader().getResource("...")
    - David

  • Xml parsing and checking for certain elements

    Hi,
    I need your help on how to parse an xml and check for certain elements
    in the xm. Can any one help on this regard. If you can pls send me the sample code for this one.
    Thanks and Regards,
    Srini

    http://java.sun.com/xml/tutorial_intro.html

  • Problem Transforming modified in-memory XML doc

    In a web app, I'm using javascript to load an XML document and an XSL stylesheet. The XML data is presented in html with <input> tags to allow the user to modify the in-memory XML document. Whenever a user modifies the data, the in-memory XML document is modified accordingly, a xslt processor object is created using the in-memory stylesheet, the XML is transformed via XSL and the updated XML data is again presented in html with <input> tags, etc., etc.
    This is working fine when the user initially loads the page, and after the user performs any action that deletes content {i.e. nodeToDelete.parentNode.removeChild(nodeToDelete);}. However, I cannot get the html transform of the modified XML to work when the user adds content { var newElement = myXmlDoc.createElement('tag'); ... parentNode.appendChild(newElement);}. Using alert boxes I can see that the in-memory XML document is being modified correctly when you both delete and add content, but upon xsl transformation, only changes that delete content are being reflected in the resultant html. This is very confusing..
    At present, I am stumped and not sure how to proceed. I'm hoping someone out there may have encountered this problem previously and has a solution, or can tell me what I'm doing wrong. Thanks in advance for any help.

    In a web app, I'm using javascript to load an XML document and an XSL stylesheet. The XML data is presented in html with <input> tags to allow the user to modify the in-memory XML document. Whenever a user modifies the data, the in-memory XML document is modified accordingly, a xslt processor object is created using the in-memory stylesheet, the XML is transformed via XSL and the updated XML data is again presented in html with <input> tags, etc., etc.
    This is working fine when the user initially loads the page, and after the user performs any action that deletes content {i.e. nodeToDelete.parentNode.removeChild(nodeToDelete);}. However, I cannot get the html transform of the modified XML to work when the user adds content { var newElement = myXmlDoc.createElement('tag'); ... parentNode.appendChild(newElement);}. Using alert boxes I can see that the in-memory XML document is being modified correctly when you both delete and add content, but upon xsl transformation, only changes that delete content are being reflected in the resultant html. This is very confusing..
    At present, I am stumped and not sure how to proceed. I'm hoping someone out there may have encountered this problem previously and has a solution, or can tell me what I'm doing wrong. Thanks in advance for any help.

  • Simple Transformation to deserialize an XML file into ABAP data structures?

    I'm attempting to write my first simple transformation to deserialize
    an XML file into ABAP data structures and I have a few questions.
    My simple transformation contains code like the following
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"
                  xmlns:pp="http://www.sap.com/abapxml/types/defined" >
    <tt:type name="REPORT" line-type="?">
      <tt:node name="COMPANY_ID" type="C" length="10" />
      <tt:node name="JOB_ID" type="C" length="20" />
      <tt:node name="TYPE_CSV" type="C" length="1" />
      <tt:node name="TYPE_XLS" type="C" length="1" />
      <tt:node name="TYPE_PDF" type="C" length="1" />
      <tt:node name="IS_NEW" type="C" length="1" />
    </tt:type>
    <tt:root name="ROOT2" type="pp:REPORT" />
        <QueryResponse>
        <tt:loop ref="ROOT2" name="line">
          <QueryResponseRow>
            <CompanyID>
              <tt:value ref="$line.COMPANY_ID" />
            </CompanyID>
            <JobID>
              <tt:value ref="$line.JOB_ID" />
            </JobID>
            <ExportTypes>
              <tt:loop>
                <ExportType>
                   I don't know what to do here (see item 3, below)
                </ExportType>
              </tt:loop>
            </ExportTypes>
            <IsNew>
              <tt:value ref="$line.IS_NEW"
              map="val(' ') = xml('false'), val('X') = xml('true')" />
            </IsNew>
          </QueryResponseRow>
          </tt:loop>
        </QueryResponse>
        </tt:loop>
    1. In a DTD, an element can be designated as occurring zero or one
    time, zero or more times, or one or more times. How do I write the
    simple transformation to accommodate these possibilities?
    2. In trying to accommodate the "zero or more times" case, I am trying
    to use the <tt:loop> instruction. It occurs several layers deep in the
    XML hierarchy, but at the top level of the ABAP table. The internal
    table has a structure defined in the ABAP program, not in the data
    dictionary. In the simple transformation, I used <tt:type> and
    <tt:node> to define the structure of the internal table and then
    tried to use <tt:loop ref="ROOT2" name="line"> around the subtree that
    can occur zero or more times. But every variation I try seems to get
    different errors. Can anyone supply a working example of this?
    3. Among the fields in the internal table, I've defined three
    one-character fields named TYPE_CSV, TYPE_XLS, and TYPE_PDF. In the
    XML file, I expect zero to three elements of the form
    <ExportType exporttype='csv' />
    <ExportType exporttype='xls' />
    <ExportType exporttype='pdf' />
    I want to set field TYPE_CSV = 'X' if I find an ExportType element
    with its exporttype attribute set to 'csv'. I want to set field
    TYPE_XLS = 'X' if I find an ExportType element with its exporttype
    attribute set to 'xls'. I want to set field TYPE_PDF = 'X' if I find
    an ExportType element with its exporttype attribute set to 'pdf'. How
    can I do that?
    4. For an element that has a value like
    <ErrorCode>123</ErrorCode>
    in the simple transformation, the sequence
    <ErrorCode>  <tt:value ref="ROOT1.CODE" />  </ErrorCode>
    seems to work just fine.
    I have other situations where the XML reads
    <IsNew value='true' />
    I wanted to write
    <IsNew>
            <tt:value ref="$line.IS_NEW"
            map="val(' ') = xml('false'), val('X') = xml('true')" />
           </IsNew>
    but I'm afraid that the <tt:value> fails to deal with the fact that in
    the XML file the value is being passed as the value of an attribute
    (named "value"), rather than the value of the element itself. How do
    you handle this?

    Try this code below:
    data  l_xml_table2  type table of xml_line with header line.
    W_filename - This is a Path.
      if w_filename(02) = '
        open dataset w_filename for output in binary mode.
        if sy-subrc = 0.
          l_xml_table2[] = l_xml_table[].
          loop at l_xml_table2.
            transfer l_xml_table2 to w_filename.
          endloop.
        endif.
        close dataset w_filename.
      else.
        call method cl_gui_frontend_services=>gui_download
          exporting
            bin_filesize = l_xml_size
            filename     = w_filename
            filetype     = 'BIN'
          changing
            data_tab     = l_xml_table
          exceptions
            others       = 24.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.

  • How to only restore only certain elements after reinstall

    Hi guys
    Quick question. My macbook is reeeeally tired, so I've decided to give it a complete reinstall of Snow Leopard. However, I am confused how I should proceed without loosing some vital things.
    Here's the thing!
    I have a complete timemachine backup of my machine but I do not wish to simply restore this entire image. I want a reinstall completely (to get rid of whatever is making my computer slow) and then just pull certain elements from timemachine to the newly installed and fresh OS.
    I this possible? (1) reinstall (2) hook my timemachine drive to the computer (3) selected e.g. apps, musik, docs etc. to restore (i.e. restoring vital elements without getting the bugs back)
    I have tried looking everywhere for this, so it would be for great help if anybody can answer!
    thanks

    That's much more complex that you may think, and is probably overkill anyway.
    Reinstalling apps selectively can be done, but won't work well for complex ones -- if an app comes with it's own Installer, it almost certainly puts other files in other places, in addition to putting the app in your Applications folder. If you don't know what and where all those other files are, and restore them, too, the app probably won't work well, if at all.
    It's usually much better (and safer) to address the problem(s) directly.
    See Baltwo's post: http://discussions.apple.com/thread.jspa?messageID=11853228&#11853228

  • Specifying the output order of elements in XML using Oracle Reports.

    Hi,
    I am developing an Oracle Reports report, using Report
    Builder 6.0.8.17.0 on WinNT. The requirement is that the report
    will only ever be used to generate XML output.
    However, due to a bug in the XML Parser at the other end,
    it's necessary to have certain elements appear in the XML before
    others.
    e.g. This simplistic example shows XML output from Reports
    runtime, which looks something like this:
    <DEPT id="10">
    <NAME>Government</NAME>
    <EMP id="4435">
    <SAL>12000</SAL>
    <ENAME>Harry Boland</ENAME>
    <EMP>
    <EMP id="8643">
    <SAL>21000</SAL>
    <ENAME>Michael Collins</ENAME>
    <EMP>
    <EMP id="9900">
    <SAL>47000</SAL>
    <ENAME>Eamonn de Valera</ENAME>
    <EMP>
    <LOCATION>
    <ADDRESS type="street">Kildare St.</ADDRESS>
    <ADDRESS type="city">Dublin</ADDRESS>
    </LOCATION>
    </DEPT>
    However, the application that is parsing the XML fails due to
    the fact that it expects the LOCATION element to be the first
    within the DEPT element. i.e. before the NAME or any of the EMP
    elements.
    The way I have developed this is by creating a master query
    which creates a master group, G_DEPT, with two column, ID and
    NAME, and two detail queries and corresponding detail groups, EMP
    and LOCATION. These groups are joined to the master using the
    datalink facility in Report Builder.
    Is there any way in Report Builder I can specify that the
    LOCATION element is to be output for each DEPT element before any
    other element belonging to DEPT?
    Thanks,
    Iibhear.

    The order of the elements is determined by the order of the columns in the Data Model. Note that you can also use the "Exclude from XML output" property to completely omit columns form the XML output.
    Message was edited by:
    Brian Hill
    This applies to Reports 10g. I don't know if it also works in 6i.

  • Does anybody know why when I aTrying to edit my yahoo profile using Firefox certain elements do not show up such as update "Load Photo" on the avatar page.

    Trying to edit my yahoo profile using Firefox and certain elements do not show up such as update "Load Photo" on the avatar page.
    If I use Explorer it allows me to see all the links and can edit my profile but not in Firefox.
    I am not sure the URL will let you in as is a private link.

    '''Try the Firefox SafeMode''' to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4.0+ SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    '''''If it is good in the Firefox SafeMode''''', your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes
    ''When you figure out what is causing that, please let us know. It might help other user's who have that problem.''

  • ABAP Simple Transformation - How to save XML to file with CL_FX_WRITER?

    Hello!
    When calling a Simple Transformation program for transformation from ABAP to XML, it is possible to specify RESULT XML rxml as a class reference variable of type CL_FX_WRITER, which points to an XML writer.
    How to handle CL_FX_WRITER in order to save XML to a file?
    Thanks and regards,
    Andrey

    Hallo Rainer!
    Many thanks. I have checked the profile parameter ztta/max_memreq_MB and it is set to 2048 MB in the development system. I hope, that won't be less on the client's machine. The only thing I did not clearly explained, is that I need to write XML data to the server. I am so sorry. Downloading to the local PC is very helpful for me also, but only for the test purposes.
    Regards,
    Andrey

  • Remove element from xml using dom.

    i want to remove an element from an xml file using dom.
    i remove the element but the whole content of the file is also deleted.
    how can i rewrite the file.

    vij_ay wrote:
    subject :Remove element from xml,but if empty element in input file then output should be <tag></tag>, not like <tag.xml/>I assume you mean <tag/> but why do you want this? Any application that will not accept this valid XML construct is flawed and a bug report should be raised against it.

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

  • Schema Validation on attributes of an element in XML againt XSD schema

    Hi,
    I had generated artifact java classes from XSD schema file.Now i am validatiing one sample XML document by using these classes in JAXB.The XML document is validated successfully.but only elements are validated ,but not attributes of that elements.for example ,i am giving wrong element which is not defined inside the schema file,it throws validation error as expected ,whereas validation against wrong attributes of elements in XML it is not working anyway,it does not throw any validation errors,but it should throw validation errors.kindly help me to solve this issue.
    Here The sample validation code snippets :
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.bind.ValidationEventLocator;
    public class MyEventHandler implements ValidationEventHandler{
         public boolean handleEvent(ValidationEvent ve) {
              if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
                        ve .getSeverity()==ValidationEvent.ERROR){
                   ValidationEventLocator locator = ve.getLocator();
                   //Print message from valdation event
                   System.out.println("Invalid booking document: "
                             + locator.getURL());
                   System.out.println("Error: " + ve.getMessage());
                   //Output line and column number
                   System.out.println("Error at column " +
                             locator.getColumnNumber() +
                             ", line "
                             + locator.getLineNumber());
              return true;
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new MyEventHandler());

    Here is my analagous 'strange' behavior. I am jaxb processing and then marshalling generated classes to XML ( following the simple Sun 'PurchaseOrder' example )
    1. This works:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'>
    </xsd:complextType>
    </xsd:schema>
    2. This doesn't:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'/>
    <xsd:attribute name='name2'/>
    </xsd:complextType>
    </xsd:schema>
    That is, using more than one attribute line within this simple complex type causes nothing to be marshalled to XML.
    Ideas?

  • How to create an array in one field and have another field display certain elements from that array?

    I am making a form in Acrobat XI pro.
    In one text field, I created an array of several elements. I want other text fields to display certain elements from that array. For instance, one field should display the 3rd element, another field should display the 13th element, etc.
    The Javascript for making the array is very long, and so I don't want to have to re-calculate the array every single time (in order to reduce rendering time when I open the form on an iPad). This is why I'd like to only have to create the array once, and simply refer to it throughout the form.

    What code are you using to update the array currently? Are you completely rebuiding it when an element changes, or just changing specific elements for certain fields? I'm still not sure what exactly you are trying to do, but something like this in a document level script will create your array:
    var myArray;
    // Call 'updateArray' to initialize array
    updateArray();
    function updateArray() {
         // Code here to create/update array
         myArray = new Array();
         myArray[0] = "Value 1";
         myArray[1] = "Value 2";
         myArray[2] = "Value 3";
    Then, for each field that needs to update this array, you can add a call to 'updateArray()' in the appropriate event. This will rebuild the array completely; if you just want to update specific elements, then you can access them directly.

  • How to check the element  in xml file by xpath

    hi all,
    * How to check the element in xml file by xpath
    for the following XML file,
    * I want to check whether
    the element (sage) is present or not in the following xml file XPATH expression...
    * I have tried by the following expression ,
    NodeList result = (NodeList) xpath.evaluate("//*:student/*:sage/text()",xml_dom,XPathConstants.STRING);
    System.out.println(result.item(0).getLocalName()); * I want to get the Element sage as String value....
    but i am not able to get the element,why that ??? and How to do that ???
    MyXML File :
    <x:student>
    <x:sname>aaa</x:sname>
    <x:sage>26</x:sage>
    </x:student>
    Thanks,
    JavaImran

    <code>* Thanks for reply....
    * </code><code>In </code>
    <code>x:student element x represents the namespace...thats why i put *:student in my expression....
    "//*[local-name() = 'student']/*[local-name() = 'sage']/text()"* By the above code , i am not able to get the sage as string from
    </code> resul.item(0).getLocalName() method.......?
    * How to get that as string format ?

  • 1. How do I add CSS effects to a certain element?

    How do I add CSS effects to a certain element?
    There are several effects (like customized hover effects) that I could with CSS. I want to know how do I add the CSS effects for a certain element/object from within Edge animate.

    The way to add css in general is
    sym.$('element').css({
    'Property':'value',
    'Property':'value',
    'Property':'value'

Maybe you are looking for

  • How to create an ERP Sales Order in CRM by referring to CRM Quotation

    Hello Experts: My requirement is as follows: I have done the replication of customers and materials between ECC and CRM.  I need to create a quotation in CRM and create a follow-up transaction as ERP Sales Order within CRM. My question is: how do i l

  • Error trying to restore from iCloud

    I'm trying to restore a new iPhone from the Cloud but keep getting the following error message - Could Not Sign In - There was a problem connecting to the server. Wi-fi connection is good and Apple ID and password are all correct. What does this mean

  • Handle non-*** key figure in IM

    Hi Gurus   I'm using a non-cumulative key figure in our inventory management scenario. Let me give an example:   after the initialization        2007-09-01   MaterialA      20        2007-09-01   MaterialB      10        2007-09-01   MaterialC      1

  • Insert graphic logo to java smtp mail

    Hi All, I am creating email using the apache commons email package. The doubt I have it to insert a graphic image in this HTMLMail. Any kind of image added comes as an attachement to the mail, but I would like to see this image at the signature part

  • Ipod nano (5th gen) plays music on speakers even after connecting earphones...how to stop that?

    ipod nano (5th gen) plays music on speakers even after connecting earphones...how to stop that?