#1
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)
  2. #2
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)
  4. #3
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)
  6. #4
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    potential bug


    There is a big assumption being made on the characters() call. The assumption that characters will be called once, with the all data, is wrong. characters() can be called multiple times with parts of the content data (which is why the interface is characters(chars, start, len)). You really should be building up the content in a member variable and handling it most likely in the endElement(), but it depends on the stucture of your XML. My advice would be to never do content handling in the characters method.

    With small XML documents, you may not ever notice this, since the input stream won't hit a buffer boundary and characters() will only get called once, but as the XML gets bigger, you are more likely to run into it. It will manifest itself by not matching any of your elements. The XML will appear mangled, but when you look at the source XML, it looks fine.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Posts
    2
    Rep Power
    0

    [no subject]


    I'm compliled the MyFourthSaxApp and i put the class file in
    WEB-INF\classes\MyFourthSaxApp.class and in CLASSPATH.
    when I request the MyFourthSaxApp.jsp
    I have a error:

    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


    An error occurred between lines: 6 and 13 in the jsp file: /MyFourthSaxApp.jsp

    Generated servlet error:
    C:\jwsdp-1_0_01\work\Standard Engine\localhost\_\MyFourthSaxApp$jsp.java:61: Class org.apache.jsp.MyFourthSaxApp not found.
    MyFourthSaxApp myFourthExample = new
    ^


    An error occurred between lines: 6 and 13 in the jsp file: /MyFourthSaxApp.jsp


    As I can decide the problem?
  10. #6
  11. No Profile Picture
    Ducani
    Guest
    Devshed Newbie (0 - 499 posts)

    XML Parsing With SAX and Xerces (part 2)


    XML Parsing With SAX and Xerces \(part 2\)

    The first part of this article demonstrated the basics of the Xerces XML parser, explaining how it could be used to process XML documents in a non-Web environment. This concluding section closes the circle, taking everything you've learned so far and demonstrating how it can be applied to create dynamic Web pages from static XML documents with Xerces.

    Please discuss this article in this thread. You can read the article here .

IMN logo majestic logo threadwatch logo seochat tools logo