Community discussions

MikroTik App
 
avicencio74
just joined
Topic Author
Posts: 2
Joined: Wed May 08, 2013 12:54 am

How create script to export in xml fomat

Wed May 08, 2013 1:02 am

Hi all:

I need create a script for export MAC & IP Address to XML file? Anyone can help me with ideas please?

Thanks a lot
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26933
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: How create script to export in xml fomat

Wed May 08, 2013 11:09 am

It is not possible in RouterOS. You could do it with some other program. Why do you need an XML file? XML can be different types, you must know exact syntax of all fields.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How create script to export in xml fomat

Wed May 08, 2013 4:34 pm

XML is a text file, interpreted in a special way later on.

Assuming you know the element and attribute names you need, you can just write the XML out as a string, and then save the string as a file - you know, the same way you'd save a plain text file.
 
avicencio74
just joined
Topic Author
Posts: 2
Joined: Wed May 08, 2013 12:54 am

Re: How create script to export in xlm fomat

Wed May 08, 2013 7:35 pm

Sorry, correct is XLM format... not XML
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How create script to export in xml fomat

Wed May 08, 2013 7:58 pm

You mean an eXceL Macros file or a Xen Loadable Module file?

And either way... neither of these are data formats... what do you expect them to do with the data?
 
ajinder
just joined
Posts: 20
Joined: Thu Nov 17, 2011 9:33 am

How create script to export in xml fomat

Wed May 08, 2013 8:37 pm

@Normis. What other program's can be used to export MAC LIST.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How create script to export in xml fomat

Wed May 08, 2013 8:55 pm

You can use the API with some programming language, and create such a program yourself.

I'm not aware of any publically available programs, especially one that would be as specific as exporting a MAC list to XLM (whichever of the two XLMs you mean by that) - people typically make their own program for their specific needs and don't release them.