Home › Forums › Problems and solutions in GDL › GDL add-ons › XML Extension
Tagged: XML
- This topic has 9 replies, 5 voices, and was last updated 6 years, 11 months ago by Michael Herse.
-
AuthorPosts
-
-
September 30, 2015 at 07:18 #1588Kristian BursellParticipant
A few examples of traversing the XML ‘tree’ would be greatly appreciated.
I can get the results I want but feel that there are a few too many steps in the paths I map. As it is always crucial to map data in the most efficient methods I think a few best practice tips would be really beneficial here.
can you provide a few example of moving between nodes.thanks
CADSWIFT
Australia -
September 30, 2015 at 18:03 #1602Gergely FehérKeymaster
Thanks for the topic Kristian, I put it on the list. I’m afraid it will take a while before we can release a post about it, as we have limited resources.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
September 30, 2015 at 23:47 #1603Kristian BursellParticipant
Thanks Gergely, I completely understand the time it may take and never expected a quick response. It would be so useful that I am happy to wait and can get by for now anyway.
hopefully responses don’t rely purely on your resources and some of our fellow GDLers can share their knowledge. If I ever get time to really pull it apart to create more efficient mapping then I will document as I go and post it.CADSWIFT
Australia-
November 5, 2015 at 16:43 #1901Csilla MaiKeymaster
Hi Kristian,
A new post has been created about the XML Extension in the Tips And Tricks section: How to use the GDL XML Add-On?. It contains a basic example about listing the parameter descriptions and values of an xml file. If you would like to see a more complex example then please send your request to gdlcenter@graphisoft.com. We will check it before long and may release a new post about it.
Csilla Mai
Library Developer, Library Team
GRAPHISOFT SE
-
-
November 12, 2015 at 06:15 #1910Kristian BursellParticipant
Thank you Csilla,
I will email through my request with a bit of detail shortly.
CADSWIFT
Australia -
November 15, 2015 at 11:39 #1916Kristian BursellParticipant
Thank you for the information in Tips and Tricks it is very useful.
I am now struggling a little with the OUTPUT function of the XML Add-on.
I have manage to modify the XML file with OUTPUT and a bit of testing help me to understand the navigation aspect, which as you know is done using the INPUT commands as describe in Tips and Tricks.
The issue i cannot resolve is how to get the OUTPUT function to create a new line in the XML file. Using the only 4 options available (AsNextSibling/AsPreviousSibling/AsFirstChild/AsLastChild) only allows me to write on the same line as the Position Description. Can I get it to create a new line or do I have to come up with a different XML structure?I’m using the ‘Copy’ function so perhaps if i had a specific character in the XML file that got copied in this function perhaps that would somehow create my new line for me?
thanks,
KristianCADSWIFT
Australia -
October 30, 2017 at 07:33 #3631Michael HerseParticipant
Hi Kristian
Did you ever work out how to create a new line? I’m just starting to play around with the XML Extension, and having new Children and Siblings that I write to the XML file on new lines would make interrogating my results much easier. Currently everything is just on 1 line, making the xml difficult to read when I open it in Xcode.
Cheers,
Michael. -
November 6, 2017 at 03:26 #3649Kristian BursellParticipant
Hi Michael,
No i didn’t and i don’t believe it is possible. lines in XML don’t actually mean anything and are just convenient formatting (as you probably know).
The way i do it is i set up a sample of the structure i want and then using GDL I copy this structure and then populate the copy. feel free to call (0412 781 769) if you want to discuss it further.CADSWIFT
Australia -
November 6, 2017 at 13:29 #3650Joachim SühloParticipant
Michael, you can use a tool like this (for expanding the code on separate lines):
https://www.freeformatter.com/xml-formatter.htmlGDL Object Developer
b-prisma
MAC OSx 10.14 -
November 7, 2017 at 09:53 #3655Michael HerseParticipant
Thanks for the suggestions guys, especially your offer of assistance Kristian. The tool that Joachim posted is all I need for the time being.
Cheers,
Michael.
-
-
AuthorPosts
- The forum ‘GDL add-ons’ is closed to new topics and replies.