We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2009-10-05 06:40 PM
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Row> <teamMember>Team Member 1</teamMember> <role>Role 1</role> <street>123 Fake Street</street> <city>Houston</city> <state>Texas</state> <zip>77077</zip> <phoneNumber>123 456 7890</phoneNumber> </Row> <Row> <teamMember>Team Member 2</teamMember> <role>Role 2</role> <street>456 Real Street</street> <city>Houston</city> <state>Texas</state> <zip>77077</zip> <phoneNumber>123 098 7654</phoneNumber> </Row> </Root>The GDL script is attached. Everything is in the Parameter script, and is using the PARAMETERS command to update the values in the parameter list. This is my first attempt at working with the XLM extension and I am not quite sure if my problem is with the GDL or with the XML. Any help is greatly appreciated
2009-10-07 08:29 PM
<ROOT> <ROW> Row Content </ROW> <ROW> Row Content </ROW> </ROOT>When I get the number of children on ROOT, instead of getting the expected 2 it returns 5. As I start stepping into ROW, I get first a NODE type of Text with a value of a square (yup, a square shows up as the value... this is a string type variable) and name of #text and the next NODE is type Element with a blank value and a name of Row.
2009-10-13 01:43 PM
2009-10-14 06:04 PM
2009-10-22 11:01 PM
channel =OPEN ("XML", "wrongfilename.xml", "rl")Next I use an IF statment
IF channel > 0 THEN ... ELSE ... ENDIFThe code in the ELSE section never executes. I thought that channel should only be greater than 0 if the xml file opens successfuly. Any ideas on what I am doing wrong?
2009-10-26 06:00 PM
Michael wrote:I'm afraid you're right. Theoretically, it can be -1 if some error occurs during opening the file. In practice, such an error produces an interpretation error and the whole interpretation is stopped. I guess you preferred it ran on with the -1 channel. Is this the case?
One more problem I am experiencing is with error checking on opening the xml file. I am trying to OPEN a non-existant XML file. Starting from the example in the GDL manual my open code ischannel =OPEN ("XML", "wrongfilename.xml", "rl")Next I use an IF statmentIF channel > 0 THEN ... ELSE ... ENDIFThe code in the ELSE section never executes. I thought that channel should only be greater than 0 if the xml file opens successfully. Any ideas on what I am doing wrong?
2009-10-26 08:16 PM
2009-10-27 05:00 PM
2009-11-02 06:25 PM