File Loaction in m_binder Object

Hi All,
I wanted to know where(in which variable) content is stored in the m_binder object. e.g when we call a GetFile service, the content is retrieved but even when I debugged the UCM, I could not find the location of the place from where content is put on the browser.
I am building a custom handler which get the file and then checks it in. I am able to do this, but this service is also returning a file. so the aim is to delete the returned by (by nullifying a array, stream etc) when the check in is successfully.
any pointers will be highly appriciated.
many thanks,
swapnil

F5

Similar Messages

  • How do I stop automatic placement of files as a smart object in Photoshop CS4?

    I have done numerous searches on the internet to find out how to stop Photoshop from placing files as a smart object. I followed the suggestion of going to Edit > Preferences > General to uncheck the "Place or Drag Raster Images as Smart Obejct" but that option does not appear in Photoshop CS4. Does anyone know how to deal with this issue in CS4?

    This may sound strange, but to avoid the "Smart Object" designation, just stop "placing" the files. Either open them, or copy and paste them into Photoshop.
    If you're just opening raster files in Photoshop, they come in as pixels - drag a newly opened raster file onto your target Photoshop file. If you're copy/pasting art from Illustrator, you can choose at the time whether it is a "Smart Object," or "Pixels." Sounds like you want pixels.

  • How can i return a file as a Tranferable object

    This method bundles up the data to be exported into a Transferable object in preparation for the transfer.*My requirement is to transfer a file as a object.* Here in example it returns a string. So i would like to know how can
    we code to transfer a file( NOT FILE NAME).
    Example:-
    protected Transferable createTransferable(JComponent c) {
    // cast component in JList
    JList list = (JList)c;
    // Get collect the values that have been currently selected
    Object[] values = list.getSelectedValues();
    StringBuffer buff = new StringBuffer();
    for (int i = 0; i < values.length; i++) {
    Object val = values;
    buff.append(val == null ? "" : val.toString());
    if (i != values.length - 1) {
    buff.append("\n");
    return new StringSelection(buff.toString()); // Return as a string
    My Requirement:- So here we are doing
    protected Transferable createTransferable(JComponent c) {
    JXTable table = (JXTable)c;
    int row = table.getSelectedRow();
    int col= table.getSelectedColumn();
    *// Here we get the absolute path of file. i.e C:\Ashish.txt from   Table's selected cell*
    Object value=table.getValueAt(row,col);
    *// Here we access that file with location*
    File file = new File(value);
    *// And now i want to transfer that file as a Transferable object*
    return ( file ); // Need to return a file(NOT FILE NAME)
    In above procedure i would not able to return a file as a object. Please suggest me. Thanks in advance.
    Ashish Pancholi

    Thank you very much for your valuable advice.I am in need of one more help.......
    As i am on task to do resize window of my JAVA API and drags a file from JXTable and drop it to my desktop OR any where in file system then it should be copy their.
    But i am getting to difficulties
    *1> As i start a file to drag and cross the edge of my JAVA API..cursor of mouse is showing be Symbol of DefaultCopyONDrop (/) something like that.*
    *2> I sincerely need a absolute path of location where i have released my mouse to drop so that i can copy that file their.*
    So can you please help me know the solution of these two difficulties. I want file system to accept my file which i am dragging and need location to copy file. Once again thanks in advance.

  • File to File Interface without ESR objects

    Hello everyone,
    I have a requirement where our business users will  produce the .csv files in one location and we need to move to another location.
    I recon that we can build this File to File interface( usin FCC) without using ESR objects, can any one help me with the procedure since i am new to PI.  
    Thanks in advance

    HI Chandrika ,
    File to File Interface without ESR objects
    this is very simple , you need to create Configuration objs
    1. sender Communication channel and agrrenment
    2. receiver Communication channel and agrrenment
    3. u have to provide dummy service interface names and name space in interface determination,
    4.in receiver determination , we have to provide source and receiuvers bu.components and remaining dummy names.
    thanks,

  • MDG File Import for Custom Object

    Hello Experts,
    We are in MDG 6.1 and trying to implement the File import for custom object. Basically the idea is used to DTIMPORT transaction.Apart from the configurations in MDGIMG, What are the classes that has to be implemented? Can anyone share some info on this.
    Thanks

    Hi,
    After seeing this thread, i rechecked my POD. Email Id is not there.  Did you find any solution or explanation why it is not there?

  • XML log: Error during temp file creation for LOB Objects

    Hi All,
    I got this exception in the concurrent log file:
    [122010_100220171][][EXCEPTION] !!Error during temp file creation for LOB Objects
    [122010_100220172][][EXCEPTION] java.io.FileNotFoundException: null/xdo-dt-lob-1292864540169.tmp (No such file or directory (errno:2))
         at java.io.RandomAccessFile.open(Native Method)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
         at oracle.apps.xdo.dataengine.LOBList.initLOB(LOBList.java:39)
         at oracle.apps.xdo.dataengine.LOBList.<init>(LOBList.java:30)
         at oracle.apps.xdo.dataengine.XMLPGEN.updateMetaData(XMLPGEN.java:1051)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:511)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1121)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1144)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:558)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    I have this query defined in my data template:
    <![CDATA[
    SELECT lt.long_text inv_comment
    FROM apps.fnd_attached_docs_form_vl ad,
    apps.fnd_documents_long_text lt
    WHERE ad.media_id = lt.media_id
    AND ad.category_description = 'Draft Invoice Comments'
    AND ad.pk1_value = :project_id
    AND ad.pk2_value = :draft_invoice_num
    ]]>
    Issue: The inv_comment is not printing on the PDF output.
    I had the temp directory defined under the Admin tab.
    I'm guessing if it's the LONG datatype of the long_text field that's causing the issue.
    Anybody knows how this can be fixed? any help or advice is appreciated.
    Thanks.
    SW
    Edited by: user12152845 on Dec 20, 2010 11:48 AM

    Hi All,
    I got this exception in the concurrent log file:
    [122010_100220171][][EXCEPTION] !!Error during temp file creation for LOB Objects
    [122010_100220172][][EXCEPTION] java.io.FileNotFoundException: null/xdo-dt-lob-1292864540169.tmp (No such file or directory (errno:2))
         at java.io.RandomAccessFile.open(Native Method)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:98)
         at oracle.apps.xdo.dataengine.LOBList.initLOB(LOBList.java:39)
         at oracle.apps.xdo.dataengine.LOBList.<init>(LOBList.java:30)
         at oracle.apps.xdo.dataengine.XMLPGEN.updateMetaData(XMLPGEN.java:1051)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:511)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1121)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:1144)
         at oracle.apps.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:558)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:445)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:308)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    I have this query defined in my data template:
    <![CDATA[
    SELECT lt.long_text inv_comment
    FROM apps.fnd_attached_docs_form_vl ad,
    apps.fnd_documents_long_text lt
    WHERE ad.media_id = lt.media_id
    AND ad.category_description = 'Draft Invoice Comments'
    AND ad.pk1_value = :project_id
    AND ad.pk2_value = :draft_invoice_num
    ]]>
    Issue: The inv_comment is not printing on the PDF output.
    I had the temp directory defined under the Admin tab.
    I'm guessing if it's the LONG datatype of the long_text field that's causing the issue.
    Anybody knows how this can be fixed? any help or advice is appreciated.
    Thanks.
    SW
    Edited by: user12152845 on Dec 20, 2010 11:48 AM

  • Upload a Dicom file into an OrdDicom object

    Hi,
    Is it possible to upload a Dicom file into an OrdDicom object using JSP?
    I now that an image file can be uploaded into an OrdImage object by passing that file from the jsp page to a java bean class through an OrdHttpUploadFile object, that has a method loadImage(OrdImage ob).
    Which is the mechanism for a Dicom file?

    Hi,
            Check the below code.
    TYPE-POOLS: truxs.
    TYPES:
      BEGIN OF ty_line,
        vbeln LIKE vbap-vbeln,
        posnr LIKE vbap-posnr,
      END OF ty_line.
    *data:  ty_Lines TYPE STANDARD TABLE of ty_Line WITH DEFAULT KEY.
    DATA: itab   TYPE STANDARD TABLE OF ty_line WITH DEFAULT KEY.
    DATA: itab1  TYPE truxs_t_text_data.
    SELECT
      vbeln
      posnr
      UP TO 10 ROWS
      FROM vbap
      INTO TABLE itab.
    CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
      EXPORTING
        i_field_seperator    = ';'
      TABLES
        i_tab_sap_data       = itab
      CHANGING
        i_tab_converted_data = itab1
      EXCEPTIONS
        conversion_failed    = 1
        OTHERS               = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename = 'd:\TEMP\test1.txt'
      TABLES
        data_tab = itab1
      EXCEPTIONS
        OTHERS   = 1.
    IF sy-subrc eq 0.
      WRITE: 'Data downloaded successfully'.
    ENDIF.
    DATA: BEGIN OF IEXCEL OCCURS 0.
          INCLUDE STRUCTURE ALSMEX_TABLINE.
    DATA: END OF IEXCEL.
    PARAMETERS: FILENM   LIKE rlgrap-filename MEMORY ID M01,
                NOHEADER AS CHECKBOX.
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      exporting
        filename                      = FILENM
        i_begin_col                   = 1
        i_begin_row                  = 1
        i_end_col                     = 100
        i_end_row                     = 30000
      tables
        intern                        = IEXCEL
      EXCEPTIONS
        INCONSISTENT_PARAMETERS       = 1
        UPLOAD_OLE                    = 2
        OTHERS                        = 3.
    if sy-subrc <> 0.
       WRITE: / 'EXCEL UPLOAD FAILED ', FILENM, SY-SUBRC.
    endif.

  • Adding a translation file as a Supporting Object

    Hello all,
    had a quick look rummage around but couldn't find anything regarding this, is it possible to have a translation xlf file as a supporting object so when the user installs the application they can just install the translated file along with the other objects?
    Cheers,
    James
    EDIT apologies, wrong forum
    Edited by: user9006256 on 19-Jan-2010 04:29

    No version number and no clear description of what you are asking. The XLF file type is primarily associated with 'Crystal Xcelsius' by SAP. SAP is not Oracle and Oracle does not support this file format nor is there any reason I can think of why it would or should. Can you explain what you are trying to accomplish?

  • Change PM Notification - attach / display file as service of object

    Hi experts .
    My requirements are :
    1. open attached file of selected notification for display ( if exists one)
    as it done in transaction iw22->System->Services for Object
    2. attach a file as service of object (in the same transaction Iw22)
    If any  function exists for it ? - In batch input option attach file in non active
    Please your help. Helena

    I'm also not familiar with IW22.
    But I can help you in debugging screens. Open a new notepad and paste the ff:
    [FUNCTION]
    Command=/H
    Title=Debugger
    Type=SystemCommand
    save it and include it in your pc's shortcut icons for easier drag and drop.
    You can simply drag and drop this notepad on the sap screen to activate debugging on screen.

  • Why does the Amount slider on the Detail Panel reset to 0 when saving the file as a Smart Object?

    Whenever I open a Smart Object PSD file to adjust previous settings in RAW, I have noticed that the Amount slider in the Detail panel has reset to 0. Does this reduce the files sharpening? Is this a normal behavior? Can this be prevented?
    I use a Mac running 10.6.8 and Photoshop CS6, version 13.0.5 x 64.

    This behavior happens only on Mac desktop computer, not on my Mac laptop running the same CS6.
    After I've edited an ACR file (including sharpening in the Detail panel), I change the file into a PSD Smart Object to complete my edit by clicking on "Open Object". I immediately notice this PSD file is not sharp. If I click on the bottom right of the image icon to return to the RAW file, I find the Amount slider in the Detail Panel has changed from the sharpening amount I gave it, to 0.
    If I do the exact same thing on my laptop (running a duplicate of the same Photoshop CS6), this behaviour does not happen. The image remains sharp as a PSD file, and if I check by returning to ACR, the Amount slider has maintained its setting.
    Anything more you need?

  • CS5 is opening raw files as a smart object to files im currently working

    I just bough new CS 5 and find this big error. When i open raw file in Camera Raw and i have opened some jpg in CS5, it always opened as a smart object to this small jpg i have opened before. The same is doing my CS 5 when i drag some file from desktop, it always ended as a smart object in file im currently working with. Normaly it has to open as a new file not as a smart object in this file im already working with.

    How are you opening your RAW files? If you are dragging and dropping them onto Photoshop, on top of an already opened file's workspace -  all files will be placed as smart objects. If you drag the files to anywhere else in the interface, for instance the grey area on top of the workspace, they should open as usual. If you are opening them via Bridge or by double-clicking them in Explore, they should open as normal.

  • Add a file to to MIME object at runtime

    In runtime, Is there any option to create a file at runtime and after that add that file to MIME objects??

    Yes, this is possible.
    The Image source can be a context attribute.
    You would need to populate the attribute appropriately.
    When you say create a file, do you mean file download ?
    See the UI element to download a file.
    If you wish to generate a graphic, you can call the IGS (internet graphic server)
    to build a jpg.
    See the samples in the WD component WDR_TEST_UI_ELEMENTS
    regards
    Phil

  • How to get the actual data of a file held in IWDResource object?

    Hello,
    I am uploading a csv/excel file and writing it to the server using the FuleUpload UI and IWDResource Interface.
    I need to make some things on the data before I write it:
    1. count the number of columns are in the csv/excel file in each line.
    2. replace special characters in the file using replaceAll for example.
    My problem is how to access the data once it is stored in the IWDResource interface? All I have there is the read method which generated an InputStream object to read bytes from the file.
    Any ideas?
    Roy

    If you want to read cell level or row level data from excel you should use third party APIs. Apache POI provides such an API, you can use and read the excel documents. You can refer the POI API
    <a href="http://poi.apache.org/hssf/quick-guide.html#ReadWriteWorkbook">here</a>.
    And if you want to read the CSV file content do the following..
    FileInputStream fis=(FileInputStream)wdContext.currentContextElement().get<attribute anme>().read(false);
    byte in[]      = new byte[512];
    String csvData;
    StringBuffer csvBuffer = new StringBuffer();
    while(fis.read(in)>0)
    csvData = new String(in);
    csvBuffer.append(csvData);
    //now write the logic to validate the csv data.
    Regards
    Abhilash

  • Unable to import merep text file as a data object in DOE

    Dear All,
    I have exported a sync bo from MI 2.5 system, to a text file. Then i have tried importing the same text file into DOE. Then the following error has occured.
    "No active nametab exists for ZEFLMI_DOC_HDR_T51".
    I am unable to understand what could be the problem. Can someone please help me, how to resolve this issue, so that syncbo can be imported as a data object.
    Regards,
    Kiran.

    Hi,
    The backend for middleware should be same as what it was in MI.
    the erro comes when the corrosponding structure in a bapi doesnot exists in current backend.
    Please check if the structure ZEFLMI_DOC_HDR_T51 exists in backend.
    Thanks,
    Rohit

  • Parse of a xml file to an java object model

    Hello,
    I'm trying to do a program that receive an xml file and ought to create all the neccesary java objects according to the content of the parsed xml file.
    I've all the class created for all the objects that could be present into the xml and the idea is to go down in the tree of nodes recursively until it returns nodes more simple. Then, I create the last object and while I come back of the recursively calls, I create the objects more complex until I reached to the main object.
    Until now, I have part of this code, that is the one wich have to parse the parts of the xml.
    public static void readFile(String root){
              DocumentBuilderFactory factory = DocumentBuilderFactory
                   .newInstance();
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   Scanner scanner = new Scanner(new File(root)).useDelimiter("\\Z");
                   String contents = scanner.next();
                   scanner.close();
                   Document document = builder.parse(new ByteArrayInputStream(contents.getBytes()));
                   Node node = null;
                   NodeList nodes = null;
                   Element element = document.getDocumentElement();
                   System.out.println(element.getNodeName());
                   NodeList subNodes;
                   NamedNodeMap attributes;
                   //if (element.hasAttributes())
                   visitNodes(element);
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
         private static void visitNodes (Node node){
              for(Node childNode = node.getFirstChild(); childNode!=null;){
                   if (childNode.getNodeType() == childNode.DOCUMENT_NODE){
                        System.out.println("Document node Name " + childNode.getNodeName());
                        visitNodes(childNode);
                   }else if (childNode.getNodeType() == childNode.ELEMENT_NODE){
                        System.out.println("Node Name " + childNode.getNodeName());
                        if (childNode.hasAttributes()){
                             visitAttributes(childNode.getAttributes());
                        if (childNode.hasChildNodes()){
                             visitNodes(childNode);
                   }else if (childNode.getNodeType() == childNode.TEXT_NODE && !childNode.getNodeValue().contains("\n\t")){
                        System.out.println("Node value " + childNode.getNodeValue());
                   Node nextChild = childNode.getNextSibling();
                   childNode = nextChild;
         private static void visitAttributes(NamedNodeMap attributes){
              Node node;
              for(int i = 0; i < attributes.getLength(); i++){
                   node = attributes.item(i);
                   System.out.print(node.getNodeName() + " ");
                   System.out.print(node.getNodeValue() + " ");
                  }I don't know the use of childNodeType. For example, I expected that the XML tags with childs in his structure, enter by the option NODE_DOCUMENT and the tags without childs by the ELEMENT_NODE.
    But the most important problem I've found are the nodes [#text] because after one ELEMENT_NODE I always found this node and when I ask if the node hasChilds, always returns true by this node.
    Has any option to obtain this text value, that finally I want to display without doing other recursively call when I enter into the ELEMENT_NODE option?
    When one Node is of type DOCUMENT_NODE or DOCUMENT_COMMENT? My program always enter by the ELEMENT_NODE type
    Have you any other suggestions? All the help or idea will be well received.
    Thanks for all.

    Hello again,
    My native language is Spanish and sorry by my English I attemp write as better I can, using my own knowledge and the google traductor.
    I have solved my initial problem with the xml parser.
    Firstly, I read the complete XML file, validated previously.
    The code I've used is this:
    public static String readCompleteFile (String root){
              String content = "";
              try {
                   Scanner scanner = new Scanner(new File(root)).useDelimiter("\\Z");
                   content = scanner.next();
                   scanner.close();
              } catch (IOException e) {
                   e.printStackTrace();
              return content;
         }Now, I've the file in memory and I hope I can explain me better.
    I can receive different types of XML that could be or not partly equals.
    For this purpose I've created an external jar library with all the possible objects contained in my xml files.
    Each one of this objects depend on other, until found leaf nodes.
    For example, If I receive one xml with a scheme like the next:
    <Person>
        <Name>Juliet</Name>
        <Father Age="30r">Peter</Father>
        <Mother age="29">Theresa</Mother>
        <Brother>
        </Brother>
        <Education>
            <School>
            </school>
        </education>
    </person>
    <person>
    </person>The first class, which initializes the parse, should selecting all the person tags into the file and treat them one by one. This means that for each person tag found, I must to call each subobject wich appears in the tag. using as parameter his own part of the tag and so on until you reach a node that has no more than values and or attributes. When the last node is completed I'm going to go back for completing the parent objects until I return to the original object. Then I'll have all the XML in java objects.
    The method that I must implement as constructor in every object is similar to this:
    public class Person{
      final String[] SUBOBJETOS = {"Father", "Mother", "Brothers", "Education"};
      private String name;
         private Father father;
         private Mother mother;
         private ArrayList brothers;
         private Education education;
         public Person(String xml){
           XmlUtil utilXml = new XmlUtil();          
              String xmlFather = utilXml.textBetweenXmlTags(xml, SUBOBJETOS[0]);
              String xmlMother = utilXml.textBetweenXmlTags(xml, SUBOBJETOS[1]);
              String xmlBrothers = utilXml.textBetweenMultipleXmlTags(xml, SUBOBJETOS[2]);
              String xmlEducation = utilXml.textBetweenXmlTags(xml, SUBOBJETOS[3]);
              if (!xmlFather.equals("")){
                   this.setFather(new Father(xmlFather));
              if (!xmlMother.equals("")){
                   this.setMother(new Father(xmlMother));
              if (!xmlBrothers.equals("")){
                ArrayList aux = new ArrayList();
                String xmlBrother;
                while xmlBrothers != null && !xmlBrothers.equals("")){
                  xmlBrother = utilXml.textBetweenXmlTags(xmlBrothers, SUBOBJETOS[2]);
                  aux.add(new Brother(xmlBrother);
                  xmlBrothers = utilXml.removeTagTreated(xmlBrothers, SUBOBJETOS[2]);
                this.setBrothers(aux);
              if (!xmlEducation.equals("")){
                   this.setEducation(new Father(xmlEducation));     
    }If the object is a leaf object, the constructor will be like this:
    public class Mother {
         //Elements
         private String name;
         private String age;
         public Mother(String xml){          
              XmlUtil utilXml = new XmlUtil();
              HashMap objects = utilXml.parsearString(xml);
              ArraysList objectsList = new ArrayList();
              String[] Object = new String[2];
              this.setName((String)objects.get("Mother"));
              if (objects.get("attributes")!= null){
                   objectsList = objects.get("attributes");
                   for (int i = 0; i < objectsList.size();i++){
                     Object = objectsList.get(i);
                     if (object[0].equals("age"))
                       this.setAge(object[1]);
                     else
         }Each class will have its getter and setter but I do not have implemented in the examples.
    Finally, the parser is as follows:
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.HashMap;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.xml.sax.SAXException;
    public class XmlUtil {
         public HashMap parsearString(String contenido){
              HashMap objet = new HashMap();
              DocumentBuilderFactory factory;
              DocumentBuilder builder;
              Document document;
              try{
                   if (content != null && !content.equals("")){
                        factory = DocumentBuilderFactory.newInstance();
                        builder = factory.newDocumentBuilder();
                        document = builder.parse(new ByteArrayInputStream(content.getBytes()));
                        object = visitNodes(document);                    
                   }else{
                        object = null;
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
                   return null;
              } catch (SAXException e) {
                   e.printStackTrace();
                   return null;
              } catch (IOException e) {
                   e.printStackTrace();
                   return null;
              return object;
         private HashMap visitNodes (Node node){
              String nodeName = "";
              String nodeValue = "";
              ArrayList attributes = new ArrayList();
              HashMap object = new HashMap();
              Node childNode = node.getFirstChild();
              if (childNode.getNodeType() == Node.ELEMENT_NODE){
                   nodeName = childNode.getNodeName();                    
                   if (childNode.hasAttributes()){
                        attributes = visitAttributes(childNode.getAttributes());
                   }else{
                        attributes = null;
                   nodeValue = getNodeValue(childNode);
                   object.put(nodeName, nodeValue);
                   object.put("attributes", attributes);
              return object;
         private static String getNodeValue (Node node){          
              if (node.hasChildNodes() && node.getFirstChild().getNodeType() == Node.TEXT_NODE && !node.getFirstChild().getNodeValue().contains("\n\t"))
                   return node.getFirstChild().getNodeValue();
              else
                   return "";
         private ArrayList visitAttributes(NamedNodeMap attributes){
              Node node;
              ArrayList ListAttributes = new ArrayList();
              String [] attribute = new String[2];
              for(int i = 0; i < attributes.getLength(); i++){
                   atribute = new String[2];
                   node = attributes.item(i);
                   if (node.getNodeType() == Node.ATTRIBUTE_NODE){
                        attribute[0] = node.getNodeName();
                        attribute[1] = node.getNodeValue();
                        ListAttributes.add(attribute);
              return ListAttributes;
    }This code functioning properly. However, as exist around 400 objects to the xml, I wanted to create a method for more easily invoking objects that are below other and that's what I can't get to do at the moment.
    The code I use is:
    import java.lang.reflect.Constructor;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class UtilClasses {
         public Object UtilClasses(String package, String object, String xml){
              try {
                Class class = Class.forName(package + "." + object);
                //parameter types for methods
                Class[] partypes = new Class[]{Object.class};
                //Create method object . methodname and parameter types
                Method meth = class.getMethod(object, partypes);
                //parameter types for constructor
                Class[] constrpartypes = new Class[]{String.class};
                //Create constructor object . parameter types
                Constructor constr = claseObjeto.getConstructor(constrpartypes);
                //create instance
                Object obj = constr.newInstance(new String[]{xml});
                //Arguments to be passed into method
                Object[] arglist = new Object[]{xml};
                //invoke method!!
                String output = (String) meth.invoke(dummyto, arglist);
                System.out.println(output);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            } catch (SecurityException e) {
                e.printStackTrace();
            } catch (NoSuchMethodException e) {
                e.printStackTrace();
            } catch (IllegalArgumentException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            } catch (InvocationTargetException e) {
                e.printStackTrace();
            } catch (InstantiationException e) {
                e.printStackTrace();
              return null;
         }This is an example obtained from the Internet that I've wanted modified to my needs. The problem is that when the class calls this method to invoke the constructor and does not fail, this does not do what I expect, because it creates an empty constructor. If not, the parent class gives a casting error.
    I hope that now have been more clear my intentions and that no one has fallen asleep reading this lengthy explanation.
    greetings.

Maybe you are looking for

  • Can't find my mistake

    I am writing a user creation script and just working through my variables at this point.  So i have the script importing a csv file with user info.  Based on that user info it creates a series of variables three of which i am using the switch command

  • System hanged, unable to access it thru network or directly.

    Hi, We have IBM X-Series Servers. Oracle Enterprise Linux 5.3 is installed over it.. Sytem is running for last 1 yr, suddenly it ihanged as if it is disconnected , we tried to access it but failed , as display is not coming on monitor like blank scre

  • Can I install my trail on an external drive?

    can i download the trail CC onto an external drive if i don't have sufficient storage on my mac HD?

  • Setting text of a JLabel in an array

    Hey everyone. Im making a spreadsheet type program, but i have hit a brickwall and for the life of me i can't figure out what is wrong. What i'm trying to do, is check if the input in a cell is in the form e.g "=A3". Then i want the program to goto A

  • "valid digital signature" required????

    I am trying to download a poker website that i have been using for years and i now get a message saying "...valid digital signature missing...".  I don't understand.  I would appreciate any help.  Thanks