Author Topic: Official xml-api thread  (Read 4376 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Official xml-api thread
« on: January 07, 2004, 01:54:34 PM »
1. The xml-api can be found here http://theswamp.org/swamp.files/xml-api

2. Please keep question and comments related to the xml-api.

3. The xml-api is not open source, and is copyrighted.

4. The xml-api was created by swamp member Columbia
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Official xml-api thread
« Reply #1 on: January 07, 2004, 02:11:49 PM »
- Columbia
Are you using the msxml3.dll to parse the .xml files, or is it all done by reading-writing to the .xml file with Vlisp?
TheSwamp.org  (serving the CAD community since 2003)

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Official xml-api thread
« Reply #2 on: January 07, 2004, 02:30:25 PM »
I have a few Q's also.
1.
Were you ever intending to release the source?
 ~ if not; Are you intending to create a FAS so people can compile your api into their projects?

2.
<? xml version="1.0"?>  
<Settings>  
  <Layers>  <-------This is a child object correct?
...
 ~ I got a question if that isnt a child object.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Anonymous

  • Guest
Official xml-api thread
« Reply #3 on: January 08, 2004, 12:09:43 PM »
Mark,

Yes, well no, kinda, but not really...  I'm using the DOM interface that belongs with msxml3.dll but I'm not importing it as a type library.  I have had bad perfromance issues when importing a type library in the past.  Therefore I just create an Active-X object reference and use the properties and methods that way.

Se7en,

At this point, I was not going to give out the source.  I worked for a long time and very hard on this and some of it is proprietary.  I may change my mind in the future.  I know how nice it is to have source code, so I will be thinking about it.  However, yes, I can post a *.fas file.  I actually never really thought about it.  And that's why I didn't do it before.
Mark, should I send the *.fas to you like I did with the others?

To any and all,

If you have any questions on how to use some of this stuff, please let me know.  I'm by no means an expert on XML, but I have obviously done a lot of thinking, creating, and research on it.  I will help in anyway I can.

Columbia

  • Guest
Official xml-api thread
« Reply #4 on: January 08, 2004, 12:15:46 PM »
*Frack*

Yeah, that's my thread above.  I hate it when I don't have an automatic log-in on my home PC.  :evil:

Anyway, to answer you 2nd question Se7en...

<Layers> is a child of Settings and a Parent of the elements under it.

Does that make any sense?  It's a nested tree type of structure.

deegeecees

  • Guest
Official xml-api thread
« Reply #5 on: January 08, 2004, 12:16:38 PM »
THANKYOU COLUMBIA!

This is excellent. I have a new resource for database coding! :D

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Official xml-api thread
« Reply #6 on: January 08, 2004, 12:52:37 PM »
Source: I compleatly understand man. (It's your code, your not obligatied to give up your intelectual stuff by any means) but yes, it is nice to have source or a file to compile into your source.

Child/Parent: Yep. that is what i thought. That's good. (I'm thinking onthe right track. :P )

I'm off to do some more reading now...

:D
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Official xml-api thread
« Reply #7 on: January 08, 2004, 12:55:20 PM »
>Mark, should I send the *.fas to you like I did with the others?

that's fine, i'll include it with the other files.


Question:
Could i see another example of this method, i'm not following you here. :-/
XML-Get-Document
Description:
queries an XML file for the DOM Active-X object
Arguments:
  XML file (string); a variable to store the DOM object
Example:
(XML-Get-Document projfile 'XMLDoc) returns vla-object
TheSwamp.org  (serving the CAD community since 2003)

Columbia

  • Guest
Official xml-api thread
« Reply #8 on: January 08, 2004, 01:16:09 PM »
Code: [Select]

;; using the xml file from the earlier example

(defun test (/ file docObject)
  (setq file (findfile "dwgset.xml"))
  ;; here you do not have to do a setq to set
  ;; the docObject variable.  We pass the symbol
  ;; name to the function -- thereby acting as "pass-by-reference
  (XML-Get-Document file 'docObject)
  (if docObject
    (progn
      (vlax-invoke-method 'docObject 'NextNode) ;; steps into the version node
      (vlax-invoke-method 'docObject 'NextNode) ;; returns the Settings element
    )
  )
)


There are many properties and methods unique to the DOM Document object that are not available to Element or Attribute Objects.  However, if you are not going to be accessing those in particular I suggest that you use the XML-Get-XMLObject function instead.  It eleminates some lines of code from your routine.  Anyway, you can always access the Document object from and Element or Attribute object via the 'OwnerDocument property.

I hope this helps.  If not let me know, and I'll try again.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: Official xml-api thread
« Reply #9 on: June 19, 2013, 07:00:01 AM »
Hi!

Is it possible to get xml-api i´m very intressted, what kind of progr you have programed the API Columbia?
« Last Edit: June 19, 2013, 09:40:26 AM by cadplayer »