TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: psuchewinner on May 14, 2008, 09:30:17 AM
-
Can ayone tell how the retreive info from an XML document using Visual Lisp?
Like listing the "Children" from the "Parent"?
-
It doesn't appear that too many people have delved into XML with lisp and the two people I know that did, don't visit here much if at all anymore. If you go to Columbia's profile, you might be able to email him or at least send him a personal message.
-
Thanks, I was thinking about that.
-
Seems to have worked. Long time no see, Columbia.
-
I'm still around, Daron, I just don't have the time to lurk and respond as I used to. :(
Besides, it seems by the time I get to a topic, about 600,000 people have already answered the question that was asked. I feel a little redundant saying the same thing somebody else has said.
-
Here is a little something to point you in the right direction ... it could be improved substancially but I think it will give you some ideas about how to proceed.
(defun mlchild(/ doc xmldoc xmlchildren)
(vl-load-com)
(if (= xmlc-NODE_TEXT nil)
(vlax-import-type-library
:tlb-filename "msxml2.dll"
:methods-prefix "xmlm-"
:properties-prefix "xmlp-"
:constants-prefix "xmlc-")
)
(setq doc (getfiled "" "" "" 8))
(setq xmldoc (vlax-create-object "Microsoft.XMLDOM"))
(xmlm-Load xmldoc doc)
(setq xmlchildren (vlax-get xmldoc 'childNodes))
;;; work on the child nodes here ... there may be nested child nodes!!
;;; don't forget to release your objects ;)
)
-
Thanks for the help.
You know?, It weird, I usually catch on to this stuff pretty fast but this is new to me and I am struggling.
I will chew on this.
-
I'm still around, Daron, I just don't have the time to lurk and respond as I used to. :(
That's good to hear. I had wondered if you had gone the way of the dodo bird.