XML parsing

Discussion in 'Java' started by gk, Jan 9, 2006.

  1. gk

    gk Guest

    i want to send a XML string to a pop-up window.

    the pop up window would accept the xml string and parse it.

    and it will display the parsed elements.

    How should it be done ?


    should i first parse the XML and put those in the javabean ?


    Please tell me the flow , how this could be done ?
    gk, Jan 9, 2006
    #1
    1. Advertising

  2. gk wrote:
    > i want to send a XML string to a pop-up window.
    >
    > the pop up window would accept the xml string and parse it.
    >
    > and it will display the parsed elements.
    >
    > How should it be done ?
    >
    >
    > should i first parse the XML and put those in the javabean ?
    >
    >
    > Please tell me the flow , how this could be done ?


    You provide very few information to work with. What seems apparent for
    me is that you have not GUI centric application architecture in mind.
    "send an XML string to a pop-up window" is usually not what one does in
    a GUI application (whatever you understand as "send"). Also, a pop-up
    window is not where one would typically parse XML. You sound as if you
    try to apply a typical batch-job-like flow of control (pushing data
    around) in a GUI application. This typically fails in GUI application.

    GUI applications are typically event centered. The GUI is in control,
    and you don't "send" something to a GUI, instead the GUI requests
    information when it seems appropriate for the GUI.

    Very popular GUI application architectures are MVC and its many
    variants. In this architecture you have a separation of concerns (who is
    doing what and when), and clear communication ways (events). And in
    fact, Sun's GUI toolkit is based on an MVC variant. I would suggest you
    spend some time to learn the principles of the Swing/AWT architecture
    first (the comp.lang.java.gui FAQ should contain a pointer to a TSC
    article describing the Swing architecture, plus pointers to Sun's GUI
    tutorial).

    You won't get very fare if you try to beat the existing architecture
    into submission by throwing heaps of code onto it.

    Once you know the Swing/AWT architecture you can design your
    application. You will probably have some model (maybe a TreeModel),
    which provides the information from the XML data in a way suitable for a
    Swing Component (widget), maybe a JTree. The JTree might end up in some
    JDialog, and the JDialog might provide some way to couple the model with
    the widget used to display the data.

    /Thomas
    --
    The comp.lang.java.gui FAQ:
    ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
    http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
    Thomas Weidenfeller, Jan 9, 2006
    #2
    1. Advertising

  3. gk

    goasklaura

    Joined:
    Oct 22, 2012
    Messages:
    1
    parse 35 GB XML files quickly...

    Have you tired Expresso XML Parser? It's a high performance parser that has a graphical interface. You log onto a website and parse your XML file online so you can create parsing rules without writing code. Then you link up to your existing project using their client code. At the moment they have client code in java and javascript.

    They have a free developer version at sxml. com. au
    goasklaura, Oct 22, 2012
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Per Magnus L?vold
    Replies:
    0
    Views:
    1,376
    Per Magnus L?vold
    Nov 15, 2004
  2. Greg Wogan-Browne
    Replies:
    1
    Views:
    802
    Uche Ogbuji
    Jan 28, 2005
  3. Replies:
    2
    Views:
    497
  4. John Levine
    Replies:
    0
    Views:
    729
    John Levine
    Feb 2, 2012
  5. Erik Wasser
    Replies:
    5
    Views:
    446
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page