Xml parser in sketchup
-
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. -
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.
-
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement