Best way to create, modify, XML with JSP ?  HELP

Hi friends,
As i am new to XML,
I know there are two APIs used for XML processing, i want to know as a begineer level, which API
is easy and good to implement XML with JSP.
1) SAX
2) DOM
i want to make a log file in XML, so on web page it will be displayed on HTML form through XSL.
Since there is good tutorial on http://www.w3schools.com/dom
but i think its HTML dom
I want XML procession through JAVA CODE , what should i use ? and give some good tutorials on XML DOM
that is used with JAVA / JSP.
HELP.
Edited by: Ghanshyam on Sep 19, 2007 3:24 PM

Well what i think is you gonna checkout with your requirements before implementing any of the popular XML parsing mechnisms.
If you are intrested in faster processing @sacrifising a gud amount of your Memory,DOM is the one which you are looking for.
If you are instrested in Managing your memory and but if you are ok with sacrifising speed SAX is the best solution.it works on what is called a push technology.
and if you think either way you might have to look towards a pull parser which is StAX (Streaming API for XML Parsing)
it'd be a gr8 idea if you can go through the below article which explians about each of the parsing mechanisms
http://www.stylusstudio.com/xml/parser.html#*
coming back to helpful resources as far java is concern checkout the below link which might be of some help.
and the main thing is that all of these parser there is a defined specification you might find implementations of different vendors on this.
eg:Sun Provides one with JDK itself,same as IBM provides one,oracle does the same & so on...
your first task would be to focus on one such implementation which can cater your requirements.
DOM:*
Basic Parsing Objects / Interfaces Involved while DOM parsing:
http://www.w3.org/TR/DOM-Level-2-Core/java-binding.html
Breif Overview & few important API details:
http://www.developerlife.com/domintro/default.htm
Simple Example:
http://www.brics.dk/~amoeller/XML/programming/domexample.html
Others:
http://www.roseindia.net/xml/dom/
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM.html#wp79994
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/1_read.html
SAX:*
http://www.javacommerce.com/displaypage.jsp?name=saxparser1.sql&id=18232
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/index.htm
http://java.sun.com/developer/Books/xmljava/ch03.pdf
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX.html#wp69937
http://www.onjava.com/pub/a/onjava/excerpt/java_xslt_ch5/index.html?page=6
StAX:*
http://java.sun.com/webservices/docs/1.6/tutorial/doc/SJSXP2.html
http://javaboutique.internet.com/tutorials/stax/
http://today.java.net/pub/a/today/2006/07/20/introduction-to-stax.html
Hope this might be of some help :)
REGARDS,
RaHuL
http://weblogs.java.net/blog/spericas/archive/2006/04/sun_stax_parser.html

Similar Messages

  • Best way to create slide show with last photo having links

    What are some of the best ways to create a slide show (more like a season greeting flash) with the last photo having links and buttons for the viewer to click?
    I already have the code for the slide show. What I need now is how do I reference or point to a keyframe that contains the last slide as the background with buttons and hyperlinks? Perhaps, I also need a way to not showing this slide until the last? How do I do that? This last slide with buttons and links are on it's own layer.
    The other route would be to create the buttons and hyperlinks in the AS3 code instead of design time. If so, how do I do on the last slide?

    What are some of the best ways to create a slide show (more like a season greeting flash) with the last photo having links and buttons for the viewer to click?
    I already have the code for the slide show. What I need now is how do I reference or point to a keyframe that contains the last slide as the background with buttons and hyperlinks? Perhaps, I also need a way to not showing this slide until the last? How do I do that? This last slide with buttons and links are on it's own layer.
    The other route would be to create the buttons and hyperlinks in the AS3 code instead of design time. If so, how do I do on the last slide?

  • Best way to create frame with stroke around a paragraph?

    What is the best way to create a frame with a stroke around text? I
    always thought it was with an inline frame, but now I see that trying to
    put the cursor in the text is very difficult because the frame blocks
    the cursor. Is there a better way?

    Thanks guys.
    What I was doing was putting the anchored frame in an empty paragraph
    above the paragraph that needed the box. The problem was when I tried to
    put the cursor in the text the anchored frame blocked it. Why is an
    anchored frame on top of text?
    The easy solution would be to cut/paste the text into the anchored frame
    (which would be similar to Ole's single cell table idea). I didn't want
    to go this route for two reasons:
    1) I don't want to cut and paste every paragraph.
    2) I didn't want the story to be broken up. I wanted it to be one long
    flow of text. It makes tings easier just in case the paragraphs have to
    break across two pages.
    Jongware's underline/strikethrough idea is another good one, but I don't
    like the idea of putting in all those extra characters.
    What I ended up doing was using paragraph rules. I set the rule above to
    1pt larger on all sides than the rule below so it looked like a box with
    a stroke. Of course, the problem with paragraph rules is getting it the
    right size. I wrote a script that calculates the size of the text and
    sets the rule size the correct amount.
    Of course this still has its problems when the boxes need to break pages...

  • Best way to create time lapse

    what is the best way to create a timelapse with fcp? or what is the best app to do this...

    You could try this with a firewire attached DV camera:
    http://www.macupdate.com/info.php/id/12306
    or if you have an HVX200, try this tip
    http://www.dvxuser.com/V6/showthread.php?t=53032
    Mark

  • What is the best way to create a database schema from XML

    What is the best way to create a database schema from XML?
    i have  a complex XML file that I want to create a database from and consistently import new XML files of the same schema type. Currently I have started off by mapping the XSD into Excel and using Mysql for Excel to push into MySQL.
    There must be a more .net microsoft solution for this but I cannot locate the topic and tools by searching. What are the best tools and way to manage this?
    Taking my C# further

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • What is the best way to include an xml file in JSP?

    I have a jsp page that I need to include an xml file. The xml file
              uses an xsl to render the file. What is the best way to include the
              xml file and still maintain the structure of the style sheet?
              Thanks
              Jennifer
              

              The best way is using the tag lib. If you cannot, but you can use JAXP, you can
              try
              javax.xml.transform.Transformer.transform(Source xmlSource,
              Result outputTarget)
              throws TransformerException
              You construct the transformer with you xsl, use you xml file or DOM to form xmlSource,
              and use JSPWriter "out" to form outputTarget (StreamResult). But if your JSP page
              generates the xml itself, tag lib is the only way.
              [email protected] (Jennifer) wrote:
              >[email protected] (Jennifer) wrote in message news:<[email protected]>...
              >> I have a jsp page that I need to include an xml file. The xml file
              >> uses an xsl to render the file. What is the best way to include the
              >> xml file and still maintain the structure of the style sheet?
              >>
              >> Thanks
              >>
              >> Jennifer
              >
              >Or is there a way to parse the xml file with the jsp page to display
              >the information. I cannot use the Java Standard Tag Libraries as the
              >version of iplanet we are running does not support the JSTL
              >
              >Thanks
              >
              >Jennifer
              

  • Dw, css, and a template, what is the best way to create a 20 page website with a different header in each page?

    dw, css, and a template, what is the best way to create a 20
    page website with different header content on each page? i am
    trying to insert a specific image and background color for each
    header on every page. what is the easiest or best way to do this?
    thanks, bryan

    "mediastream13" <[email protected]> wrote in
    message
    news:f47bes$9om$[email protected]..
    > ok, murray, here is the site.
    http://www.helphotline.org
    > in I.E. 6 i can't see the background color behind the
    header images,
    I'm seeing a hot pink background (which is my browser default
    - so that I do
    remember to declare a background color). You need to add:
    body { background-color: white;} to your stylesheet, or into
    the imbedded
    styles on your page.
    In Firefox, the very top black section, #headertop is hidden
    behind the
    header image.
    > background of the date/time isn't stretching the full
    length of the
    > screen, and
    > the margins aren't working in the main content area. how
    can i put a
    > background
    > color behind the header images?
    I can see the header image stretching right across the page..
    so not sure
    what color is missing there.
    > is there anyway to download i.e. six on my computer if i
    already have
    > i.e.7? i
    > just want to be able to preview the site before i upload
    the changes. it
    > seems
    > everything works in i.e. 7.
    Yes, I used this and it works really well.
    http://tredosoft.com/Multiple_IE
    Nadia
    Adobe® Community Expert : Dreamweaver
    CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    ~ Customisation Service Available ~
    http://www.csstemplates.com.au

  • Hi all! What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    What is the best way to create the correct space for baseball jersey names and numbers? along with making sure they are the right size for large printing.

    Buying more hard drive space is a very valid option, here.  Editing takes up lots of room, you should never discount the idea of adding more when you need it.
    Another possibility is exporting to MXF OP1a using the AVC-I codec.  It's not lossless, but it is Master quality.  Plus the file size is a LOT smaller, so it may suit your needs.

  • What's the best way to create/stitch panorama photos with Aperture?

    What's the best way to create/stitch panorama photos with Aperture?
    Many thanks
    Best

    There is no way to do this with Aperture. This thread
    https://discussions.apple.com/thread/3714693?start=0&tstart=0
    has some suggestions.

  • What is the best way to create CRUD datagrids

    What is the best way to create CRUD datagrids that tell CF
    components to update sql tables. I find that I'm having to vreate
    all these columns with custom properites and its a bit of a chore:
    <mx:DataGridColumn id = "NatWest" dataField="NatWest"
    headerText="NatWest" editable="false"
    wordWrap="true"
    textAlign="right"
    headerStyleName="centered"
    labelFunction="price_labelFuncNatWest"
    sortCompareFunction="price_sortCompareFunc">
    I don't really want to use any wizards as I want control over
    my code.

    Hi Saythj,
    When mentioning "a database schema from XML", do you mean the
    XML Schema Collections? If that is what you mean, when trying to import XML files of the same schema type, you may take the below approach.
    Create an XML Schema Collection basing on your complex XML, you can find
    many generating tools online to do that.
    Create a Table with the above created schema typed XML column as below.
    CREATE TABLE youTable( Col1 int, Col2 xml (yourXMLSchemaCollection))
    Load your XML files and try to insert the xml content into the table above from C# or some other approaches. The XMLs that can't pass the validation fail inserting into that table.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Best way to build a website with hundreds of pages

    What is the best way to build a website with hundreds of pages that include businesses in every city of the U.S. I will be building it in Dreamweaver CS4 and pulling the data from an MS Excel spreadsheet.
    I started building it by building the first page and then saving a new page with new data and so on.
    There must be a way to pull from the Excel doc without copying and pasting each page of data, and there must be a way to build this site smaller and easier to make changes when needed.
    Thanks

    You already have other people addressing the DB issues - so I will bring up the other... You are just saving a copy as a new page and then copy and pasting the changed content into  it?
    What you want to do is take the first page, once you have your design done - and save it as a template (file - save as - Dreamweaver Template).
    Then you want to select the areas (most likely the divs you have content in) that will have content changed, and select the div or p or whatever element... and go to Insert - Template Objects - Editible Region.
    Make sure you don't made editable the areas that are the primary design - such as a logo element, a header image, the navigation etc.  If you want to change those - you would do so by making the change on the template, and then it will automatically update all pages made based on that template.
    Once you are done setting up the templates - go to your new page and choose Modify - Templates - Apply Template To Page
    Select the template you just created (note it will be placed inside of a new folder titled "templates" automatically by Dreamweaver).
    Now, any of the areas you selected to add different content into will be selectable, and you can copy/paste or however you are doing so.
    Good luck

  • Best way to create slide shows in PE4 and PSE 6

    What's the best way to create a fancy slide show in PE 4 and PSE 6? I need to create a slide show of about 600 pictures. I'm on Windows XP with 3gb RAM. I've done this a few years ago in earlier versions of PE and PSE. Before i plunge into this again i wanted to get some overall guidance for what to do or not do.
    My ultimate goal is to create a slide show that:
    1. uses pan and zoom on every photo
    2. transitions between every photo
    3. has an audio track
    4. has some nice special effects -- words and graphics that appear on slide at precisely the right moment to match the song, and stay on the screen as one slide transitions to another. i want the text to be able to move and fade in and out.
    My view is that it's easy to accomplish #1-3 in PSE 6; it's quite simple to create a slide show, add pan and zoom, and transitions. However, #4 is not doable because adding text and graphics can only be done on a slide at a time and only when the slide start/stops (i.e., you can't have text appear 2 secs after the slide has started displaying and stay on screen while the next slide appears). Need PE 4 to do that.
    What i'm wondering is:
    -- is it best to create the basic slide show in PSE6 and then export to PE 4 to do the final fancy stuff, or is it best to just create the show in PE4? Seems that doing the pans, zooms, and transitions are easiest in PSE 6.

    eric,
    I am going to offer some reasons NOT to start this slide show in Photoshop Elements. This is despite the fact that I have used the workflow of starting in Photoshop Elements and used the Send Slideshow to Premiere Elements in PSE5 - PE 3 and PSE7 - PE7.
    1- Timing differences between the PSE and PE slide show construction and processing
    There are many differences in timing between the two products. Transitions can start/end slightly offset from their timing in PSE once they arrive and are processed in PE. Same for pan and zoom. Does this matter? Well the more precise your timing, the more potential for a show stopper.
    Example: one person who wanted continual motion using pan and zoom needed to go modify the transition positioning and the keyframing of the pan/zooms on every single slide after sending a slideshow from PSE to PRE.
    2- your requirement to
    "words and graphics that appear on slide at precisely the right moment to match the song, and stay on the screen as one slide transitions to another. i want the text to be able to move and fade in and out."
    You can't really sync the audio to a slide in PSE. The text can't move or fade in/out. I think that it will be more grief to retrofit these functions to a slide show that was created in PSE than it will be to do the all the work in Premiere Elements.
    3- "Add the sound track for the ENTIRE slide show (this will be longer than i currently have slides for because i don't have all the photos"
    I am suspicious that adding the ENTIRE sound track in one PSE slide show will not work.
    I have done multiple sends from PSE slide show editor to Premiere Elements. However, I decided on the approach of using no audio in the PSE slideshow editor and adding Audio in Premiere Elements AFTER sending all the slide shows.
    Again, your objective of syncing specific photos to music points is good artistically - but I am concerned that it will make your PSE to PRE workflow problematic.
    4- "as new photos arrive, do the arrangement/pans/zooms in PSE and move them to PE"
    As Steve mentioned when you do subsequent sends of the slideshow, it appends to the end - does not seem to fit your objective of replacing part of the middle.
    Also if you get new photos in for the second section of the slideshow - but over in Premiere Elements you had already made other changes in the second section. There is no function to combine new changes doen in PSE and changes done in PE for that same "section" of the slideshow.
    5- you did not say whether you will be outputting this slide show in Full Screen or Widescreen format. Will you be burning a DVD? If you will be doing widescreen output, additional problems with specifying pan/zoom in PSE have been identified on various forums because the PSE pan/zoom boxes are not widescreen aspect ratio.
    Conclusion:
    Some of my comments here are definitely subjective - however, it is my overall conclusion that your objectives and work plan are not a good fit for the Photoshop Elements slide show editor to Premiere Elements workflow.
    My perspective on the Photoshop Elements slide show editor is that it is designed to simple, quick and easy. Therefore it has limitations.

  • Is FOP the best way to create PDFs in java?

    hi,
    Is using FOP the best way to create PDFs in Java? I played with it for a while and it looks really cool.
    I think FOP is more flexible than iText since it uses XML and XSL to generate PDF files. In iText, you probably will have to hard code all the styles and layouts in java.
    Any other thoughts?

    We have a commercial alternative to FOP that might do the job - our Report Generator at http://big.faceless.org/products/report can take XML documents and convert them to PDF. Like FOP it uses CSS2, but instead of the XSL-FO tags it uses basically the same tags as HTML. There's a free trial download available so you can give it a try and see if it fits your needs.
    Cheers... Mike
    Mike Bremford - CTO mike(at)big.faceless.org
    Big Faceless Organization http://big.faceless.org

  • What is the best way to create a SSRS 2005 Line Chart Report for a 12 month period?

    I'm looking for advice on how to create a SQL Server 2005 query and line chart report for SSRS 2005.
    I need to display the peak number of patients assigned to a medical practice each month for a 12 month period based on the end-user selecting a
    single month and year.
    I've previously created a report that displays all patients assigned to the practice for any single month but I’m looking for advice on how to
    how to produce a resultset that shows the peak number of patients each month for a 12 month period. I thought about creating a query that returns the peak count for each month (based on my previously created report which displays all patients assigned to the
    practice for any single month) and then use a UNION statement to join all 12 months but I'm sure that isn't the most efficient way to do this. The other challenge with this approach (twelve resultsets combined via a UNION) is that the end-user needs to be
    able to select any month and year for the parameter and the report needs to display the 12 month period based on the month selected (the month selected would be the last month of the 12 month period).
    For the report I’ve previously created that displays all patients assigned to the practice for any single month, the WHERE statement filters the
    resultset on two fields:
    Start Date - The date the patient was assigned to the practice. This field is never null or blank.
    End Date - The date the patient left the practice. This field can be null or blank as active patients assigned to the practice do not have an End Date. When the patient
    leaves the practice, the date the patient left is populated in this field.
    Using these two fields I can return all patients assigned to the practice during Nov 2012 by looking for patients that meet the following criteria:
    start date prior to 11/30/2012 (using the last day of the month selected ensures patients added mid-month would be included)
    AND
    end date is null or blank (indicates the patient is active) OR the end date is between 11/1/2012 -11/30/2012 (returns patients that leave during the month
    selected)
    Regarding the query I need to create for the report that displays the peak count each month for 12 months, I'm looking for advice on
    how to count patients for each month the patient is assigned to the practice if the patient has been assigned for several months (which applies to most patients). Examples are:
    John Doe has a start date of 6/01/2012 and an End Date of 10/07/2012
    Sally Doe has a start date of 8/4/2012 and no End Date (the patient is still active)
    Jimmy Doe has a  start of 7/3/2012 and an End Date of 9/2/2012
    Given these examples how would I include John Doe in the peak monthly count each month for May - October, Sally Doe in the peak monthly count for
    August - December and Jimmy Doe in the peak monthly count for July – Sept if the end-user running the report selected December 2012 as the parameter?
    Given the example above and the fact I'm creating a line chart I think the best way to create this report would be a resultset that looks like
    this:
    Patient Name              
    Months Assigned
    John Doe
    June 2012
    John Doe                     
    July012
    John Doe                     
    Aug 2012
    John Doe                     
    Sept 2012
    John Doe
    Oct 2012
    Sally Doe                     
    Aug 2012
    Sally Doe                     
    Sept 2012
    Sally Doe
    Oct 2012
    Sally Doe                     
    Nov 2012
    Sally Doe
    Dec 2012
    Jimmy Doe                  
    July 2012
    Jimmy Doe
    Aug 2012
    Jimmy Doe
    Sept 2012
    From the resultset above I could create another resultset that would count\group on month and year to return the peak count for each month:
    June 2012 - 1
    July 2012 – 2
    Aug 2012 - 3
    Sept 2012 - 3
    Oct 2012 - 2
    Nov 2012 - 1
    Dec 2012 - 1
    The resultset that displays the peak count for each month would be used to create the line chart (month would be the X axis and the count would
    be the y axis).
    Does this sound like the best approach?
    If so, any advice on how to create the resultset that lists each patient and each month they were assigned to the practice would be greatly appreciated.
    I do not have permissions to create SPs or Functions within the database but I can create temp tables.
    I know how to create the peak monthly count query (derived from the query that lists each patient and month assigned) as well as the line chart.
    Any advice or help is greatly appreciated.

    Thanks for the replies. I reviewed them shortly after they were submitted but I'm also working on other projects at the same time (hence the delayed reply).
    Building a time table and doing a cross join to my original resultset gave me the desired resultset of the months assigned between dates. What I can't figure out now is how to filter months I don't want. 
    Doing a cross  join between my original resultset that had two dates:
    08/27/2010
    10/24/2011
    and a calendar table that has 24 rows (each month for a two year period)
    my new resultset looks like this:
    I need to filter the rows in yellow as the months assigned for stage 3 that started on 8/27/2010 should stop when the patient was assigned to stage 4 on 10/24/2011.
    You'll notice that Jan - Sept 2011 isn't listed for Stage 4 assigned on 10/24/2011 as I included a filter in the WHERE clause that states
    the Months Assigned value must be greater than or equal to the date assigned value.
    Any advice would be appreciated.

  • Best way to create tasks and assign to sharepoint groups

    Hi everyone, I have a custom list which contains newsletter info that is to be seen by around 400 groups (they are stores) and then I need them to mark each list item as 'completed'
    I have been trying to figure out the best way to do this and decided to keep the custom list and somehow link it to a task for each item in the list. We have nintex so was thinking of creating a workflow to create a separate task for each group (store) so
    they can mark it as completed.
    Is this the best way to go about it or am I completely off track?
    Basically all I need is a list which contains around 30 items and around 400 groups (stores) which contain users (store staff) to be able to mark items on the list as completed so it recognises that each store has completed each task.
    Thanks

    Hi  ,
    According to your description, you want to find the best way for creating tasks for 30 list items and assigning the task to around 400 groups.
    For the workflow, it is heavy  that  you need to create around 12000 (30*400) tasks .  In my opinion, the best way is to do with a custom timer job. For more information, you can refer to the
    blog:
    http://www.splessons.com/2013/12/create-a-timer-job-in-sharepoint-2013/
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

Maybe you are looking for

  • Adobe Reader disables Save as PDF

    I have been filling a few tax forms as I usually do every year. Once I was done I tried to save it as a pdf, as I have always done. But I find that Adobe Reader has disabled saving as pdf! Let me explain that when I say before I was able to do that,

  • Y2P dim screen, caps lock indicator stuck on. Already disabled adaptive brighness... Warranty?

    Hi guys. Recently bought my second Y2P, this one second hand. Reason being my previous one was the 4GB i5 model, this one is the 8GB i7 Now I've noticed a few things when I compare them. Firstly, and most annoyingly, the screen on this one is signifi

  • New wireless keyboard available/out?

    Does anyone have the new Apple wireless keyboard?

  • Clarification on how Edge works

    Hello - just want to confirm how the Edge program works before getting new iPhone 6's for the family. We have 5 lines and only 1 is a smartphone (iPhone 4 on the unlimited plan). We will be dropping 1 of the 5 line completely because it is not being

  • Axis client: Always creating null-element even if I dont set it

    I am using Axis client to integrate with Webmethods. They have a type specified with: <element name="x" type="string" minOccurs="0"/> I do not want to set the value in the field because the value is unknown for me. So I choose not to set it at all an