Re: How does revAppendXML work?
Thank for the tip Sarah! I tried your suggestion and the strange thing is I get an error after: revAppendXML targetXMLFile, "StudentURL_table", tXMLdata However, when I ask it to dump out the xml file it appears to have appended the xml files but, I think, in the wrong format. Here's what it creates: -snip- Art Fine Art 5 Creativity SPARK Site This site is great for introducing students to the varied definitions of fine art and expression. John Art [EMAIL PROTECTED] Orchard School www.kqed.org/spark Art San Fracicso, Museum of Modern Art 5 VAPA SFMOMA The San Francisco Museum of Modern Art John Art [EMAIL PROTECTED] Orchard School www.sfmoma.org Art Fine Art 5 Creativity SPARK Site This site is great for introducing students to the varied definitions of fine art and expression. John Art [EMAIL PROTECTED] Orchard School www.kqed.org/spark Art snip-- And it ends file with: ---snip- www.sfmoma.org Art Fine Art 5 Creativity SPARK Site This site is great for introducing students to the varied definitions of fine art and expression. John Art [EMAIL PROTECTED] Orchard School www.kqed.org/spark snip--- I was hoping that revAppendXML would renumber the attributes, I think that's what they are called, i.e. " I guess that is not the case. But what is strange is I get the "xmlerr" message after the first revAppendXML command, but at the end it shows all the appends to the original XML file...??? Thanks! John Patten SUSD > > > ... > > I want to take these multiple XML files and combine them into one large xml > file with the same format. > > I was thinking I could do something like this: > > answer folder "Select XML folder" as sheet > if it = "" then exit mouseUp > set the defaultFolder to it > > > put the files into tFiles > put the number of lines of tFiles into tNumberofXMLFiles > put line 1 of tFiles into theFileName > put URL ("file:" & theFileName) into tData > > get revCreateXMLTree(tData,true,true,true) > > put the result into targetXMLFile > > > put 1 into x > repeat tNumberOfXMLFiles > > > revAppendXML targetXMLFile,"/StudentURL_table/",URL "file:" & line x of > tFiles > add 1 to x > end repeat > -- > Put revXMLText(targetXMLFile,,true) > > end mouseUp > > --- > > However, I appear to be misunderstanding what revAppendXML does, or how to > use it correctly. >I can't see any major problem with what you are doing, except possibly >for the specification of the parentNode for the revAppendXML command. >Try leaving out the /'s. >I would also recommend doing it in 2 stages: read the file into a >variable, then append the variable. e.g. > put URL ("file:" & line x of tFiles) into tXMLdata >revAppendXML targetXMLFile, "StudentURL_table", tXMLdata >I always surround the file stuff with brackets before using put or get >URL. It seems to be more reliable. >And after each XML command or function, check the result and see if it >contains "xmlerr". >HTH, >Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: How does revAppendXML work?
I have multiple xml files that are identical in format... Art Fine Art 5 ... They just have different content. Such as... Art Fine Art 5 Creativity SPARK Site This site is great for introducing students to the varied definitions of fine art and expression. John Art [EMAIL PROTECTED] Orchard School www.kqed.org/spark Art San Fracicso, Museum of Modern Art 5 VAPA ... I want to take these multiple XML files and combine them into one large xml file with the same format. I was thinking I could do something like this: answer folder "Select XML folder" as sheet if it = "" then exit mouseUp set the defaultFolder to it put the files into tFiles put the number of lines of tFiles into tNumberofXMLFiles put line 1 of tFiles into theFileName put URL ("file:" & theFileName) into tData get revCreateXMLTree(tData,true,true,true) put the result into targetXMLFile put 1 into x repeat tNumberOfXMLFiles revAppendXML targetXMLFile,"/StudentURL_table/",URL "file:" & line x of tFiles add 1 to x end repeat -- Put revXMLText(targetXMLFile,,true) end mouseUp --- However, I appear to be misunderstanding what revAppendXML does, or how to use it correctly. I can't see any major problem with what you are doing, except possibly for the specification of the parentNode for the revAppendXML command. Try leaving out the /'s. I would also recommend doing it in 2 stages: read the file into a variable, then append the variable. e.g. put URL ("file:" & line x of tFiles) into tXMLdata revAppendXML targetXMLFile, "StudentURL_table", tXMLdata I always surround the file stuff with brackets before using put or get URL. It seems to be more reliable. And after each XML command or function, check the result and see if it contains "xmlerr". HTH, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
How does revAppendXML work?
Hello All! I have multiple xml files that are identical in format... Art Fine Art 5 ... They just have different content. Such as... Art Fine Art 5 Creativity SPARK Site This site is great for introducing students to the varied definitions of fine art and expression. John Art [EMAIL PROTECTED] Orchard School www.kqed.org/spark Art San Fracicso, Museum of Modern Art 5 VAPA ... I want to take these multiple XML files and combine them into one large xml file with the same format. I was thinking I could do something like this: answer folder "Select XML folder" as sheet if it = "" then exit mouseUp set the defaultFolder to it put the files into tFiles put the number of lines of tFiles into tNumberofXMLFiles put line 1 of tFiles into theFileName put URL ("file:" & theFileName) into tData get revCreateXMLTree(tData,true,true,true) put the result into targetXMLFile put 1 into x repeat tNumberOfXMLFiles revAppendXML targetXMLFile,"/StudentURL_table/",URL "file:" & line x of tFiles add 1 to x end repeat -- Put revXMLText(targetXMLFile,,true) end mouseUp --- However, I appear to be misunderstanding what revAppendXML does, or how to use it correctly. Can anyone offer advice? Thank you! John Patten SUSD ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution