Results 1 to 2 of 2

Thread: Reading the Xml File Using Autolisp

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2008-11
    Posts
    1
    Login to Give a bone
    0

    Default Reading the Xml File Using Autolisp

    Code:
    (defun XML()
     (if (not xmlc-NODE_ATTRIBUTE)
      (code:importlibrary "c:\\windows\\system32\msxml2.dll" "xml")
     )
     (setq objXMLDoc (vlax-get-or-create-object "MSXML2.DOMDocument"))
    ;;; (xmlp-put-async objXMLDoc :vlax-false)
    ;;; (xmlp-put-validateonparse  objXMLDoc :vlax-false)
    ;;; (xmlp-put-resolveExternals objXMLDoc :vlax-false)
     (xmlm-load objXMLDoc (findfile "C:\\XML File\\ENGG.xml"))
    ;;;   (setq objNode(vlax-invoke objXMLDoc "selectSingleNode" "l//DrawingInfo//"))
    ;;;     (setq objNodeList(xmlp-get-childnodes objNode))
    ;;;       (while (setq objNode (xmlm-nextnode objNodeList))
    ;;;         (princ (strcat "nodeName: "
    ;;;              (vl-prin1-to-string (xmlp-get-nodeName objNode))
    ;;;                "  Value: "(vl-prin1-to-string (xmlp-get-Text objNode)))))
    my dear friends, i used these code to get the node name and value
    But ,how i can get the attribute name and value from the xml file

    Last edited by Opie; 2008-11-11 at 02:23 PM. Reason: [code] tags added, please see Moderator Note

  2. #2
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default Re: Reading the Xml File Using Autolisp

    Give this forum topic a try. It is the one i use and i beleive it to be very straight forward and easy to use as an interface with an xml. http://www.theswamp.org/index.php?topic=525.0
    There is a piece of important information in this post that can get lost or looked over. You should use Msxml2.DOMDocument.6.0 in lieu of Msxml2.DOMDocument.3.0

Similar Threads

  1. vinfg Trouble reading and retreving data from a navisworks file.
    By ThePowerfulAvatar153395 in forum NavisWorks - General
    Replies: 2
    Last Post: 2012-03-12, 04:43 AM
  2. Photometric file (.ies) not reading properly in v2011
    By wblaney in forum Revit MEP - Families
    Replies: 4
    Last Post: 2011-11-29, 05:39 PM
  3. Reading the .slog file
    By violet78 in forum Revit Architecture - General
    Replies: 7
    Last Post: 2010-01-09, 12:42 PM
  4. Error in reading the pattern file
    By jfoss3 in forum AutoCAD General
    Replies: 4
    Last Post: 2008-12-02, 02:21 PM
  5. reading one character from a file
    By alan.100301 in forum VBA/COM Interop
    Replies: 3
    Last Post: 2006-01-03, 10:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •