07-29-2012, 02:27 PM
Sorry to bother you again, I really am but this very simple problem is beating me up ( I tried different approaches using the helpfile and xml discussions on forum).
The following example works perfect to extract "mainfolder-1" and "mainfolder-2", they both get printed out in the "out" window.
Macro Macro
But when I want to extract the "sub1" and "sub2", it doesn't work. What I mean is, only 1 gets printed out in the "out" window => "sub1".
Not "sub1" and "sub2". The method I used is by altering:
Macro Macro
to
Macro Macro
The following example works perfect to extract "mainfolder-1" and "mainfolder-2", they both get printed out in the "out" window.
Macro Macro
str sXml=
;<?xml version = "1.0"?>
;<Folder-list>
,;<Folder>
,,;<SubFolders>
,,,;<Folder>
,,,,;<Expanded>False1b</Expanded>
,,,,;<Snippets></Snippets>
,,,,;<Title>sub1</Title>
,,,;</Folder>
,,;</SubFolders>
,,;<Title>mainfolder-1</Title>
,;</Folder>
,;<Folder>
,,;<SubFolders>
,,,;<Folder>
,,,,;<Expanded>False2b</Expanded>
,,,,;<Snippets></Snippets>
,,,,;<Title>sub2</Title>
,,,;</Folder>
,,;</SubFolders>
,,;<Title>mainfolder-2</Title>
,;</Folder>
;</Folder-list>
IXml x=CreateXml
x.FromString(sXml)
ARRAY(IXmlNode) b
;------cycle path-------------
x.Path("/Folder-list/Folder" b)
;------cycle path-------------
int i
for i 0 b.len
,str titlecheck=b[i].ChildValue("Title")
,,if (!empty(titlecheck))
,,,,out(titlecheck)
But when I want to extract the "sub1" and "sub2", it doesn't work. What I mean is, only 1 gets printed out in the "out" window => "sub1".
Not "sub1" and "sub2". The method I used is by altering:
Macro Macro
;------cycle path-------------
x.Path("/Folder-list/Folder" b)
;------cycle path-------------
to
Macro Macro