sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Xml parser in sketchup

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    3 Posts 2 Posters 399 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Q Offline
      qiucx
      last edited by

      In my current project, REXML is used to parse the xml file containing information used by sketchup. However, REXML hurts the performance very much so that i have to consider another xml parse lib.

      From http://www.railstips.org/blog/archives/2008/08/11/parsing-xml-with-ruby/ we can see the http://xml4r.github.io/libxml-ruby/ is good choice, but i am not very familiar with this lib, does anyone have experience for this xml parser?
      BTW, my xml file is element base in general.

      1 Reply Last reply Reply Quote 0
      • A Offline
        Aerilius
        last edited by

        With gems that contain native code you bring in platform dependency (whereas pure Ruby was platform-independent).

        I haven't yet any experiences with libxml, but I built a solution using the browser's DOM parser (was practical since I have a webdialog anyways). Now it's much faster than ReXML, but I met another bottleneck, SketchUp's speed in creating entities.

        1 Reply Last reply Reply Quote 0
        • Q Offline
          qiucx
          last edited by

          Thanks for your reply.

          Unfortunately, i can not use DOM parser to do xml parsing.

          [edit]
          I have used the libxml and its performance is good enough for me. I setup the old version libxml and copy the ruby files, dll to plugin folder of sketchup, it works for me.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement