Should I go for DOM-parser for my THIS application?

Hello Forum ,
I need suggestions from all of you. I tell you about xml-use in my
application in brief :
we have a huge xml-file which represents properties and settings in
some business tool and getting reflected in Swing-based-UI.
So next time when user starts the application , we parse the whole xml-file
(using SAX-api based parser) and create one object (I have one class called IDOM ) which represents the whole xml-file AND then we operate on this object . Later when user chooses
the option "SAVE" , we take this object and generate (write) xml-file again .
FLAW : after parsing the existing xml-file , even if user changes one attribute-value in that huge
xml-file , we generate whole-xml-file all of again and save it .
Shall DOM be the better option for this aplication ?
Bcoz what i feel that why we avoid
DOM for huge xml file is that it creates in-memory representation of whole xml-file causing
memory-usage problem , performance and all . BUT what we are doing is nothing but the same
thing by creating object of our IDOM-class . Moreover , i suspect that our object must be consuming
more memory than that of DOM-object . Why bcoz , for example , we are using Hashtable and
Java automatically assigns a fixed amount of memory to it , even if data inside doesnt need that much...and for that we are not doing any optimization .
sorry for long message .Could you please find some time to give me your valuable suggestion?
thanx in advance for ur time n help,
Rajesh

thanx gseel..
actually we have two side of the application :
One : for creating Tool ie methodology for the end user . This is single-user task
BUT we create IDOM and may hold it for 2-3 hrs also. This is the side where
we manipulate the large-xml , only adding-delete-update attributes , elements
depending on what properties user set in Swing-based UI . Note that we dont
do any delete/add as such BUt whatever user update it gets reflected in IDOM
object and while Save , we take the IDOM-object and write xml-file once again.
TWO : This is the user side , where Tool created in first side is used . This is meant for
multiple user ( 200 to 300) .This side we dont manipulated XML , just parse the
XML , create IDOM object and use the data for business purpose .But ofcourse
each client will be having one IDOM object.
regds,
Raj

Similar Messages

  • How can I give my application to client? I work with Access 97 and use SQL Toolkit 5.0. NI must sell one license to client for distributed this application.

    Thanks,
    Jorge.

    Hi Dennis,
    But I must install SQL Toolkit 5.0 for execute my application (.EXE), in other hand my application generate errors. But I can't give an installer application to client, if is neccesary install SQL Toolkit.
    Thanks for your time,
    Jorge.

  • What database should i use for a flash application which i need to record score and name for a scoreboard.

    Hi. I wrote down the summary of my project so that you can
    understand and answer me more easily:
    I have to build an application (a little flash game) in which
    I record the number of clicks. I want the player to choose a nick
    at the beginning and when he finishes one or all the four choices
    of target, i want the application to write his nick and final score
    in a database for displaying in a scoreboard (hall of fame). All
    the new entries should be sorted according to the score. If the
    same nick appears again, it's final score will be modified in the
    scoreboard only if is higher then the previous.
    I was thinking of creating a variable for the name that is
    chosen at the beginning and a variable for the score that is
    recorded. When the player finishes the game i want the application
    to write his data in the database, and then to display the
    scoreboard (let's say top 10 players in the database from the
    highest to the lowest score).
    I never did this before so i am asking what database shoud i
    use? I need a programmer to create one for me? Or can flash
    generate the database?
    Is the variable the good way or should I aproach the problem
    by other means? And if a programmer creates a database in MySql is
    that good or he should convert it to XML, or Flash generates the
    XML?
    Thank you.

    I did areal photography one time.  What you have listed would not be on my short list for lenses to take at all.
    Maybe you could supply a little more info of the 50-100mm ?  I am going to guess you have the first version of the Canon EF-S 75-300mm?  It is a faily slow lens but if these two are the only possibility, I'd choose it.
    It and the XTi will work as a mattter of fact I took two XTi's on my flying photo experience.  But I had the fantastic EF 70-200mm.  Another thing, there is NOT a lot of room on these aircraft.
    EOS 1Ds Mk III, EOS 1D Mk IV EF 50mm f1.2 L, EF 24-70mm f2.8 L,
    EF 70-200mm f2.8 L IS II, Sigma 120-300mm f2.8 EX APO
    Photoshop CS6, ACR 8.7, Lightroom 5.7

  • Server Requirements for Launching J2EE Application on web

    Hi,
    I am new to web technologies, I apologize if I am asking a very basic question. I have a developed a J2EE Web Application for Online Assessment. I use Tomcat as server and MySQL database. I am expecting around 1000 users to simultaneously undergo our assessment. The assessment is a computerized adaptive assessment. For running the statistical calculation, I am keeping some information in the User Session, which will be around 10 Kilobytes per user.
    I was trying to understand what would be the minimum system requirements (on processing speed and ram) for supporting this application.
    Is storing more information of Session could be a bottle neck for me in supporting maximum concurrent users?
    Anticipating your help.
    Thanks
    De Paul

    You should just be able to put the SWF and wrapper HTML file
    on the server, and it just "serves" the swf and wrapper file. I
    don't think there is anything else you need, unless you are using
    LifeCycle DS.

  • Pseudo code for DOM parsing a local XMl file

    HI all,
    1)     Can any body please provide me the JAVA pseudo code for parsing xml document from local mcahine and create another xml document in another location in loca machine with small transofrmations ? (JAVA mapping using DOM parsing tehnique using an xml file in loca machine using NWDS).
    2) Provide me with the links that can help me out to work with
    JAVA mapping using DOM
    Thanks,
    Ram.

    Hi,
    Have a Search in SDN with Keywords JAVA Mapping, & will get lot of stuff
    Implermenting JAVA Mapping in PI
    Implementing a Java Mapping in SAP PI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400ee77e-f9d6-2a10-2b8c-99281a4dcf6b
    Regards
    Seshagiri

  • Which jar files should I use for XSLT?

    I'm trying to do one of the examples from the Java/XML tutorial on this site. I can't get it to work. I started with the JAXP jar file and couldn't compile because it couldn't find one of the classes it needed. I then added the XALAN jar file to my CLASSPATH and got a clean compile but it crashes when I try to create the tranformer from the factory. It gives an error that says something like the SAX parser doesn't support the namespace. I tried various iterations of this. Could someone please tell me which jar files to include and in what sequence?
    Thanx,
    Cliff

    I have the Xerces jar followed by the Xalan jar.
    I get the following error:
    C:\JBUILDER4\JDK1.3\bin\javaw -classic -classpath "C:\JBuilder4\projects\ProjectXML\classes;C:\Java\lib\xerces.jar;C:\Java\lib\xalan.jar;C:\JBUILDER4\JDK1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBUILDER4\JDK1.3\jre\lib\i18n.jar;C:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;C:\JBUILDER4\JDK1.3\jre\lib\rt.jar;C:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar;C:\JBUILDER4\JDK1.3\lib\dt.jar;C:\JBUILDER4\JDK1.3\lib\tools.jar"  -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,address=javadebug,suspend=y com.craig.xml.util.Stylizer C:\JBuilder4\projects\ProjectXML\DataAreaDescTemplate.xsl C:\JBuilder4\projects\ProjectXML\DataAreas.xml
    javax.xml.parsers.FactoryConfigurationError: java.lang.ClassNotFoundException: org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
         at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:149)
         at com.craig.xml.util.Stylizer.main(Stylizer.java:47)
    Exception in thread "main"
    This is my code:
    package com.craig.xml.util;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    // For write operation
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    * Title:        ProjectXML
    * Description:  Test Project for XML work
    * Copyright:    Copyright (c) 2002
    * Company:
    * @author Clifton Craig
    * @version 1.0
    public class Stylizer {
      // Global value so it can be ref'd by the tree-adapter
      static Document document;
      public Stylizer()
      public static void main(String[] argv)
        if (argv.length != 2)
          System.err.println ("Usage: java Stylizer stylesheet xmlfile");
          System.exit (1);
              DocumentBuilderFactory factory =
              DocumentBuilderFactory.newInstance();
              //factory.setNamespaceAware(true);
              //factory.setValidating(true);
              try
                   File stylesheet = new File(argv[0]);
                   File datafile = new File(argv[1]);
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   document = builder.parse(stylesheet);
                   // Use a Transformer for output
                   TransformerFactory tFactory =
                   TransformerFactory.newInstance();
    //               StreamSource stylesource = new StreamSource(stylesheet);
                   StreamSource documentsource = new StreamSource(datafile);
                   DOMSource styler = new DOMSource(document);
                   Transformer transformer = tFactory.newTransformer(styler);
                   StreamResult result = new StreamResult(System.out);
                   transformer.transform(documentsource, result);
              catch (TransformerConfigurationException tce)
                   // Error generated by the parser
                   System.out.println ("\n** Transformer Factory error");
                   System.out.println(" " + tce.getMessage() );
                   // Use the contained exception, if any
                   Throwable x = tce;
                   if (tce.getException() != null)
                      x = tce.getException();
                   x.printStackTrace();
              catch (TransformerException te)
                   // Error generated by the parser
                   System.out.println ("\n** Transformation error");
                   System.out.println(" " + te.getMessage() );
                   // Use the contained exception, if any
                   Throwable x = te;
                   if (te.getException() != null)
                   x = te.getException();
                   x.printStackTrace();
              catch (SAXException sxe)
                   // Error generated by this application
                   // (or a parser-initialization error)
                   Exception x = sxe;
                   if (sxe.getException() != null)
                   x = sxe.getException();
                   x.printStackTrace();
              catch (ParserConfigurationException pce)
                   // Parser with specified options can't be built
                   pce.printStackTrace();
              catch (IOException ioe)
                   // I/O error
                   ioe.printStackTrace();
      }//End Main
    }

  • Need Help..what should i use for this

    hello friends, i have to write a program which will load an xml file reader class at run time and depending on the content of xml file i'm going to generate mapping.. e.g xml file- <MyMapping> <ATO> <security type=int> </ATO> <FIX> <symbol type=String> </FIX> </MyMapping> Now i want to change the content of xml file without restarting my running application..changes should be reflected at runtime... also my xml file will contain nearly 1000 lines..so in this case which technique should i use whether i use JAXB which will give the classes of my xml file or any other ?? Also if i use JAXB whether JAXB gives classes corrsponding to my xml nodes (e.g ATO.java as per above example).

    daitkarsachin wrote:
    hi ,
    here is my question again..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    You will read the XML structure into some kind of memory model. When the user supplies a value you will search for a matching value (likely from a collection such as a map or list) and return the value in that object that you locate.
    what should be done for this ..
    See above.
    and what if i change values in my xml file..will i have to restart my application to load xml again ?
    If you change the file on the filesystem, you should simply be able to re-parse the XML file and update your in-memory model. If you instead update your in memory-model, you can serialize the model back to XML on the filesystem. Neither needs to necessarily have anything to do with application start-up (other than the fact that you would normally read in the XML model then, but updating is a separate concern, as would re-reading it).
    - Saish

  • What should be done for this ?

    hi ,
    here is my question ..my xml will have
    <Message>
    <ATO>
    <somefiled="X" type=int value=35 />
    </ATO>
    <FIX>
    <somefiled="Y" type=String value=50 />
    <FIX>
    </Message>
    Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    what should be done for this ..
    and what if i change values in my xml file..will i have to restart my application to load xml again ?

    I have changed your XML to make it well formed. Please refer this further in this reply.
    Well Formed XML:
    <Message>
         <ATO somefiled="X" type="int" value="35"/>
         <FIX somefiled="Y" type="String" value="50"/>
    </Message>
    daitkarsachin wrote:Now first i have to parse this xml ..then my java program is going to accept value from user ..and depending on user specified value i've to use either ATO or FIX fields...e.g if user value is 35 then my program should use fields within ATO node.
    what should be done for this ..A simple XPath Query can do trick for you, it can give you ATO or FIX element according to user specified value. XPath query can be:
    // replace ##user_specified_value## with value user enters.
    String xPathquery= "/Message/child::*[@value='##user_specified_value##']";
    daitkarsachin wrote:and what if i change values in my xml file..will i have to restart my application to load xml again ?Not necessary to restart application but you need to parse or reload updated XML file again.

  • Report should prompt me for parameters, please help.

    Hi All,
    I am using Crystal version 10, So is there any way I can get the behaviour of my parameters as dynamic parameter? I have this requirement because when I am deploying the Report on BO server, and try to open the report from InfoView, it is not prompting me for parameters, rather it is giving me the copy which we had scheduled earlier. To get the fresh data with different parameters, we again need to schedule the report.
    What I want is simple, Whenever user clicks on the report link in infoview, I should be promted for the parameters my report is using.
    Please help..
    Thanks
    -Azhar

    Hi
    It would prompt whenever it's refreshed.
    You can refer to Business View manager guide from [here|http://help.sap.com/businessobject/product_guides/boexir2/en/xir2_bv_admin_en.pdf ] for detailed information.
    Hope this helps!!
    Regards
    Sourashree

  • Final Cut Studio 2. Should I wait for 3? And which new Macbook Pro

    Hi,
    I'm in need of some advice. I have used Final Cut pro since it's early days having owned 1,3 and 4.5HD. I also used Motion 1 a fair bit. My video editing worked declined in the last 3 years so I didn't upgrade my software and computer as it wasn't necessary. BUT things are getting busy for me again and I have quite a few projects to complete in the next year and motion 1 and FCP 4.5HD just don't make the grade anymore (actually I love 4.5 but motion 1 was always buggy). the 17 isn't out of my budget but in terms of convenience I don't want to go that route again (I now have a 17inch PB from 2004). My questions...
    1. Should I wait for FCS 3? I heard it will be released this OCT. I don't want to have to pay 700bucks foor an upgrade to FCS3 only a few months after I get 2. Is 2 plenty good enough?
    2. Should I get the 15inch 2.66 with dedicated 9600/256mb or 2.8 with dedicated 9600/512 graphics card? I'm thinking the 2.8.
    apart from this point there isn't much difference between the 2 computers (along with L2 cache)

    1) There is no set release date for FCS 3 (sad but true) in fact there is no "official" information anywhere that confirms FCS3's existence ... whatever you've heard or read is pure speculation and basing purchasing decisions on such might be a tad risky. My advice would be that if you need FCS2's functionality right now then buy it now, especially if you are working commercially (ie you're going to get paid for this) ... but if you don't need it yet then common sense would be to bide your time.
    2) Despite your reservations, get the 17" MBP. There are no current 15" MBP's that are a good long term purchase suitable for professional editing work. How long do you expect to use this purchase? 1 or 2, maybe 3 years? or 5 years? Sooner or later you will want or need to connect a bigger, better, faster storage system to your laptop in order to keep up with your editing needs, especially as we hurtle towards affordable Digital Cinema solutions for consumers and pro's alike. NONE of the current 15" laptop lineup for Apple offers ANY suitable form of expansion facility. Sadly they have dropped their "Pro" appeal, at least with respect to Pro video editing needs.

  • What One Specification Should I Look for When Buying Optical 5.1 Speakers for the iMac 27" i7?

    Hi. I have an analog 5.1 (it came from my previous PC setup) now but only the subwoofer works, the controller for its satellite speakers maybe have been busted by the high voltage from the outlet (I've since gotten a nice AVR). If replace it since the late 2009 iMac and Macs in general only do surround sound (5.1 or higher) if it's not analog. I've read somewhere that is should be digital or optical.
    When I look for the specification that'll make this Mac do 5.1 surround, what should I look for in the speaker's specifications. I believe the non-analog 5.1 speakers are way more expensive, I'll probably buy one used but what brand and model can anyone recommend that's not that expensive, iMac/Mac compatible and will be easy to setup (you just plug it in into it's the headphone jack at the back) that'll do 5.1 on Lion and Snow Leopard (I have both installed for backup OSes and experiments). Thank you in advance.
    Gbu.

    Make sure the activation lock has been removed
    Find My iPhone Activation Lock
    This will help determine if it has been removed
    Apple's new iCloud tool can show if a used iPhone is stolen
    Make sure it is not broken and it works, including the headphone jack and speakers.
    Make sure the liquid indicator by the headphone jack is not red/pink
    iPhone and iPod: Liquid damage is not covered by warranty - Apple Support

  • HT1766 How long should it take for a icloud back up of about 6.4GB?  It has been running all night and not complete.

    How long should it take for an icloud backup of about 6.4GB?  I selected a manual backup and it has been running all night?  Thanks         

    That's going to depend alot on your internet connection speed. 6.4 GB is alot of data, especially if your connection speed is slow (DSL) or low-end cable speeds of ~1.5 Mbps.

  • What sequence setting should I use for a High Quality Video Montage?

    I am about to start a new project for a client using photographs only.  I have two questions:
    1.  What should I use for the sequence settings?  Should I edit with a HD sequence setting? 
    2.  I am going to scan the pics myself.  What Pixel or resolution is appropriate to get the best quality?  I'm looking for wide screen 16 x 9, not 3 x 4.

    First, decde how you are going to deliver this production to your client. Then tell us what that delivery medium will be. Then we'll have some advice for you.
    See the section in the FCP manual on using still images. You need to understand that in video there are only pixels, no dots per inch or lines per inch. Those terms are meaningless in video. You wil sand at a size in raw pixels that is only slightly larger than your delivery format.
    bogiesan

  • What setting should I use for Abbey Road drums?  Getting a cpu overload issue

    What setting should I use for Abbey Road drums (i.e. multi-output, stereo, etc)?  Getting a cpu overload issue.  I have a macbook pro, 4 gb ram, running Logic Pro 9.  Just 3 tracks of drums and a few real instrument tracks.  Can't find a guide in the manual for either Kontakt or Logic.  Thanks in advance!

    Hi
    AR drums are complete resource (CPU) hogs. They work better if you turn off as many of the AR internal plugins as you can.
    See section 4 (?) of the AR manual, which you can find within Kontakt (In the library area of Kontakt click hold the small "i" on the right of the "AR drummer" Library).
    Alternatively, your only solution is to increase the I/O buffer in Preferences:Audio, with the associated increase in latency
    CCT

  • How large of a backup drive should I get for my 500 GB MacBook Pro?

    I have a MBP with a 500 GB hard drive. How large of a backup drive should I get for time machine backups? If I get a 500 GB drive will it just back up everything twice (as I have 250 used) and then delete the second backup every time it rebacks up so I will just have 2 backups? Or does time machine only backup changes every time it backs up? Thanks in advance.

    tehsnyderers wrote:
    OK, so I ordered a Seagate 1.5 TB external drive. That should suffice for my iMac w/ 320 GB and MBP w/ 500 GB shouldnt it?
    Probably. See #1 in the Frequently Asked Questions *User Tip* at the top of this forum.
    Should I just partition it 750/750? or maybe 600/600/300
    Use roughly the same proportions as the data on the two Macs, adjusted for how you use them. If one changes lots of big files frequently and the other doesn't, give more space to the first one.
    so I have space to put random files as well?
    If you put important stuff on a 3rd partition, you can have TM back it up, too (unless the drive is attached to your Airport), but it will send you a warning reminding you that it's not a good idea to have both originals and backups on the same physical disk. You'll be much better off finding another way to back that up, perhaps archiving to CDs/DVDs.
    Am I able to partition it and use it with my airport extreme?
    Officially, no: http://docs.info.apple.com/article.html?path=Mac/10.6/en/15139.html
    and: http://support.apple.com/kb/HT2426
    But some folks (including me) are doing it anyway!
    So if it works for you, just be aware it's technically unsupported, and you'll get little or no help from Apple if there are problems. And a future update may break it.

Maybe you are looking for