Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

c# light vs full api differences...

2011-03-01
2013-05-15
  • julian hall

    julian hall - 2011-03-01

    Hi - I've been trying embed the c# version and don't need the indexing portion, so I have tried to use the light version.

    It seems that in the regular version

    VTDNav.getContentFragment()
    

    doesn't exist in the light version.   Is this done puposely?

    I've also noticed a lot of protection level changes for example

    VTDNav.toRawString(int i, int j)
    

    is public in the regular build and protected in the light build…

    I ask this as my code breaks when trying to use the light version.

     
  • jimmy zhang

    jimmy zhang - 2011-03-01

    I think you should stick with the standard version as the light version is a slim down version of vtd that does not support indexing, xpath and modification

     
  • julian hall

    julian hall - 2011-03-01

    thanks for the response jimmy… but i'm simply paring and xml document and reading from it.
    I am simply iterating over the nodes using VTDNav and I would like to get the content between two tags.  I was under the impression i would not be using indexing,xpath or modification?

    here is my code:

    string result;
    long l;
    if ((l = vn.getContentFragment()) != -1)
          result = vn.toRawString((int)l, (int)(l >> 32));
    

    is there another way i can accomplish this?

     
  • jimmy zhang

    jimmy zhang - 2011-03-01

    I understand that if we add getContentFragment() then you problem would be solved, but it is possible that you come back later and want another call that is not available in the light version… what is the limiting factor of you regarding the standard edition of vtd-xml?

     
  • julian hall

    julian hall - 2011-03-02

    Well i was just trying to keep things as lightweight as i could.  
    It just seems strange that methods like:

    VTDNav.toRawString(int i, int j)
    

    Are public in one distribution, and protected in another.

    I can use the full, not a big deal.  I just thought using the "lightweight" there might be some extra performance gains.

     
  • jimmy zhang

    jimmy zhang - 2011-03-02

    performance is not really that much different,. toRAwString(int i, int j) turns out to be a bad/confusing function, someone brought the issue up and we removed it…

     
  • julian hall

    julian hall - 2011-03-04

    ah ok.   
    So how would you accomplish the "getContentFragment()" method functionality otherwise?

     
  • jimmy zhang

    jimmy zhang - 2011-03-04

    cut and paste from standard version and compile it  DIY

     

Log in to post a comment.