This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
EDIT: For more detail, I use a Directory tool that points to the folder where are the XML files are located. From there I sort in descending order to get the most current file and then select the first record for that most current file and use a Dynamic Input to bring in the data. Here is where I get an issue reading the XML data on varying days.
I'm having an issue bringing in XML files for a workflow where some XML files, the data will show correctly and some days it shows no data. I've attached 2 XML files where I can read one but not the other. Using an XML viewer I can see there is data in both.
I'm pretty sure an update to the most current 2020 version will resolve this but per our Alteryx Admins, if I upgrade I will not be able to use our Alteryx Server since it will be on this current version.
Hi there. While I don't have an answer for why Alteryx won't open one file and not the other, I have given you two ways to open the XML and parse it into the desired state. I'm on the newest version, but this should work on older versions as well.
Thank you for replying. I edited my original post with the below, it gives a little more detail on my workflow. I'm using a Dynamic Input tool to retrieve the most current file from a directory and then try and read it. Not sure if that changes anything since I'm not really dropping in the actual file. Here is my update to my post:
For more detail, I use a Directory tool that points to the folder where are the XML files are located. From there I sort in descending order to get the most current file and then select the first record for that most current file and use a Dynamic Input to bring in the data. Here is where I get an issue reading the XML data on varying days.
When using your 2 workflows, if I connect to the actual files using the Input Data tool they both work but if I add the XML file to the directory with all the other files and I use my workflow to select the file it comes back empty:
I think I figured it out, it seems to be working. In the Dynamic Input tool I originally only had 'Return Child Values' selected. Once I selected all options for XML except "Search SubDirs" and clicked "Refresh" I was able to see the data in the "_OuterXML" field. In the XML Parse tool, I selected the correct "_OuterXML" field and left it on 'Auto Detect Child' and 'Return Child Values'. I then used the Select Tool for the fields containing the data I needed. Definitely was a good learning exercise.