castor

Castor 0.9.9 & XML pull parsing API (XMLPULL)

Details

  • Type: Wish Wish
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 0.9.9
  • Fix Version/s: 0.9.9.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    MS Windows 2000
  • Number of attachments :
    0

Description

Hello,

Is it possible to configure Castor using one of its properties files for using a pull parser, i.e. MXP1 or Piccolo?
If yes, how would the configuration look like?

Thanks

Bon

Activity

Hide
Ralf Joachim added a comment -

For marshalling castor requires the Xerces serializer. Unmarshalling works with every sax compliant parser.

Where do you see the advantages of using pull parser api over sax?

Even if I'm not one of the experts on the XML side of castor I guess that this feature would require a very big refactoring. If there aren't very reasonable arguments to add this or you want to do that yourself, I think we should close this issue as won't fix.

Show
Ralf Joachim added a comment - For marshalling castor requires the Xerces serializer. Unmarshalling works with every sax compliant parser. Where do you see the advantages of using pull parser api over sax? Even if I'm not one of the experts on the XML side of castor I guess that this feature would require a very big refactoring. If there aren't very reasonable arguments to add this or you want to do that yourself, I think we should close this issue as won't fix.
Hide
Bon Truong added a comment -

The advantages of using a pull parser api is speed by means of reversing control from the parser back to the application. Dennis Sosnoski has written an article about "SAX vs Pull": "http://www.sosnoski.com/articles/parsing2.html ".

Please note that I did not intend to request a major refactoring of Castor 0.9.9. All I wanted to find out was whether it's possible to configure Castor 0.9.9 to use a pull parser api without coding.

If you want to close it, please do so.

Show
Bon Truong added a comment - The advantages of using a pull parser api is speed by means of reversing control from the parser back to the application. Dennis Sosnoski has written an article about "SAX vs Pull": "http://www.sosnoski.com/articles/parsing2.html ". Please note that I did not intend to request a major refactoring of Castor 0.9.9. All I wanted to find out was whether it's possible to configure Castor 0.9.9 to use a pull parser api without coding. If you want to close it, please do so.
Hide
Werner Guttmann added a comment -

No, it's not possible, as Castor XML relies on the JAXP API to allow for configuration of the XML parser to use. As there's no support for pull parsers within this API, integrating pull parsers with Castor XML would not be an easy task. As such, I'll be closing this issue and mark it as 'don't fix'.

Show
Werner Guttmann added a comment - No, it's not possible, as Castor XML relies on the JAXP API to allow for configuration of the XML parser to use. As there's no support for pull parsers within this API, integrating pull parsers with Castor XML would not be an easy task. As such, I'll be closing this issue and mark it as 'don't fix'.
Hide
Tapan N added a comment -

XMLPull API has provided a SAX driver. Can we use this driver instead of SAX parser in castor?

Show
Tapan N added a comment - XMLPull API has provided a SAX driver. Can we use this driver instead of SAX parser in castor?
Hide
Werner Guttmann added a comment -

Tapan, can you provide me with a pointer (or more than one .. ) for me to read up ?

Show
Werner Guttmann added a comment - Tapan, can you provide me with a pointer (or more than one .. ) for me to read up ?
Hide
Tapan N added a comment -

hi Werner
I do not have pointers etc as of now. We were tyring to improver performance of castor so thought if I can try replacing the parser will xml pull parser since they have the driver.
I will try it out and post the results here.

Show
Tapan N added a comment - hi Werner I do not have pointers etc as of now. We were tyring to improver performance of castor so thought if I can try replacing the parser will xml pull parser since they have the driver. I will try it out and post the results here.
Hide
Werner Guttmann added a comment -

What I actually meant, can you point me to some erly docs that tell me a little bit about this new SAX driver for XMLPull ?

Show
Werner Guttmann added a comment - What I actually meant, can you point me to some erly docs that tell me a little bit about this new SAX driver for XMLPull ?
Hide
Tapan N added a comment -

Download xmlpull parser and you can locate the driver class at this location ->
$C:\xmlpull_1_1_3_4b\addons\java\sax2_driver\src\org\xmlpull\v1\sax2\Driver.java

The driver replacing did not work for me because we are using an older verison of castor which depends on SAX1 which works with documentHandler and the current driver class needs ContentHandler based on SAX2.

Hope this helps.
Tapan

Show
Tapan N added a comment - Download xmlpull parser and you can locate the driver class at this location -> $C:\xmlpull_1_1_3_4b\addons\java\sax2_driver\src\org\xmlpull\v1\sax2\Driver.java The driver replacing did not work for me because we are using an older verison of castor which depends on SAX1 which works with documentHandler and the current driver class needs ContentHandler based on SAX2. Hope this helps. Tapan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: