cansas1d casestudy collagen

From canSAS

Overview

case study: Collagen, SAXS data in Excel table
case study: Collagen, SAXS data in Excel chart

To demonstrate how to get SAS data into the XML standard format, consider this set of SAXS data collected at the National Synchrotron Light Source, Brookhaven National Laboratory, using a SAXS camera set up temporarily at beam line X6B (operated by the Materials Science Division, Argonne National Lab).

The sample was dry chick collagen. (Thanks to Malcolm Capel, NSLS beam line X12C for the sample.)

The raw data was collected on a linear position-sensitive detector and reduced to columns of Q, I, and Iesd (estimated standard deviation of I).

The only metadata available for this data (without resorting to digging through piles of old notebooks) was obtained from two file headers:

collagen.asc

Sep 19 1994     01:41:02 am     Elt: 00090 Seconds 
ID: No spectrum identifier defined
Memory Size: 8192 Chls  Conversion Gain: 1024  Adc Offset: 0000 Chls

collagen.saxs

dry chick collagen, d = 673 A
6531 eV, X6B

But, the data can fulfill the minimum requirements of the 1D standard file format and also make an excellent example of a minimal canSAS reduced 1-D SAS data file in XML.

Procedure

make the basic XML file

It is easiest to copy a template rather than start from an empty file. Copy the cansas1d.xml file into your working directory and rename it to collagen.xml.

modify collagen.xml

It is easier to see the metadata in the XML file before you enter the SAXS data into the file. With the brief metadata available, most lines can be eliminated. This will result in a file that looks like

<?xml version="1.0"?>
<SASroot version="1.0"
	xmlns="http://www.smallangles.net/cansas1d"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
		http://www.smallangles.net/cansas1d/ 
		http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd
	"
	>
	<SASentry>
		<Title>dry chick collagen, d = 673 A, 6531 eV, X6B</Title>
		<Run />
		<SASdata>
		   <!-- Idata lines will go here -->
		</SASdata>
		<SASsample>
			<ID>dry chick collagen, d = 673 A, 6531 eV, X6B</ID>
		</SASsample>
		<SASinstrument>
			<name>X6B, NSLS, BNL</name>
			<SASsource>
				<radiation>X-ray synchrotron</radiation>
				<wavelength unit="A">
				   1.898
				   <!-- = 12398/6531 --> 
				</wavelength>
			</SASsource>
			<SAScollimation />
			<SASdetector>
				<name>X6B PSD</name>
			</SASdetector>
		</SASinstrument>
		<SASnote>
Sep 19 1994     01:41:02 am     Elt: 00090 Seconds 
ID: No spectrum identifier defined
Memory Size: 8192 Chls  Conversion Gain: 1024  Adc Offset: 0000 Chls

dry chick collagen, d = 673 A
6531 eV, X6B
		</SASnote>
	</SASentry>
</SASroot>

prepare the SAXS data

Microsoft Excel is used here to convert the table of SAXS data into the required lines of XML for the standard. Some may prefer to use a cell formula but here, we develop a bit of Excel Macro code to clarify our procedure.

Excel macros used

Within Excel, with the SAXS data in columns as shown above (Media:Cs-collagen-data-table-Excel.jpg), let's define the macros for our use. Type <alt><F11> to open the macro editing window.

Function XML_tag(tag, attr, content) As String
  If attr = "" Then
    XML = "<" & tag & ">"
  Else
    XML = "<" & tag & " " & attr & ">"
  End If
  XML = XML & content
  XML = XML & "</" & tag & ">"
  XML_tag = XML
End Function

Function SAS_Idata_tag(element, unit, content) As String
  XML = XML_tag(element, "unit=""" & unit & """", content)
  SAS_Idata_tag = XML
End Function

Function Idata_tag(Q, Q_unit, I, I_unit, Qdev, Qdev_unit, Idev, Idev_unit) As String
  XML = SAS_Idata_tag("Q", Q_unit, Q)
  XML = XML & SAS_Idata_tag("I", I_unit, I)
  XML = XML & SAS_Idata_tag("Qdev", Qdev_unit, Qdev)
  XML = XML & SAS_Idata_tag("Idev", Idev_unit, Idev)
  Idata_tag = XML_tag("Idata", "", XML)
End Function

Your window will look similar to this one when you copy/paste the above code:

case study: Collagen, SAXS data in Excel chart

(Yes, my spreadsheet is called MyFirstMacro.xls)

Now close the macro editing window and return to the SAXS data in the spreadsheet.

Estimation of Qdev

Part of the standard requires an estimate of Qdev (from the documentation, Estimated standard deviation of Q. Must specify the unit as an attribute.) and that was not provided in the data. Best we can do is to estimate it by subtracting adjacent Q values. On inspection, these are all about 0.00055(6) 1/A so we'll pick the value Qdev = 0.00055 1/A.

Q unit is 1/A. We don't know what the intensities are so use a.u.' (arbitrary unit)

construct the Idata lines in XML

move to spreadsheet cell E5 and enter this formula

=IDATA_tag(A5,$A$4,B5,$B$4,0.00055,$A$4,C5,$C$4)

Copy it down through cell E335

Select cells E5:E335 and copy to clipboard, then paste into collagen.xml document inside the SASdata element where you see the XML comment <!-- Idata lines will go here -->.

Final Result

<?xml version="1.0"?>
<SASroot version="1.0"
	xmlns="http://www.smallangles.net/cansas1d"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.smallangles.net/cansas1d/ http://www.smallangles.net/cansas1d/1.0/cansas1d.xsd"
	>
	<SASentry>
		<Title>dry chick collagen, d = 673 A, 6531 eV, X6B</Title>
		<Run>Sep 19 1994     01:41:02 am</Run>
		<SASdata>
<Idata><Q unit="1/A">0.022756</Q><I unit="a.u.">1107.6</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.586</Idev></Idata>
<Idata><Q unit="1/A">0.023296</Q><I unit="a.u.">1038.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.6445</Idev></Idata>
<Idata><Q unit="1/A">0.023837</Q><I unit="a.u.">1071</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.919</Idev></Idata>
<Idata><Q unit="1/A">0.024377</Q><I unit="a.u.">1054.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.0684</Idev></Idata>
<Idata><Q unit="1/A">0.024917</Q><I unit="a.u.">1061.3</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.2971</Idev></Idata>
<Idata><Q unit="1/A">0.025457</Q><I unit="a.u.">1115.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.3305</Idev></Idata>
<Idata><Q unit="1/A">0.025998</Q><I unit="a.u.">1276.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.5378</Idev></Idata>
<Idata><Q unit="1/A">0.026538</Q><I unit="a.u.">1499.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.0048</Idev></Idata>
<Idata><Q unit="1/A">0.027078</Q><I unit="a.u.">1738.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.172</Idev></Idata>
<Idata><Q unit="1/A">0.027619</Q><I unit="a.u.">1802.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.335</Idev></Idata>
<Idata><Q unit="1/A">0.02816</Q><I unit="a.u.">1728.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.12</Idev></Idata>
<Idata><Q unit="1/A">0.0287</Q><I unit="a.u.">1571.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.9096</Idev></Idata>
<Idata><Q unit="1/A">0.029241</Q><I unit="a.u.">1437.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.7863</Idev></Idata>
<Idata><Q unit="1/A">0.029782</Q><I unit="a.u.">1162.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.2171</Idev></Idata>
<Idata><Q unit="1/A">0.030322</Q><I unit="a.u.">939.98</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.7143</Idev></Idata>
<Idata><Q unit="1/A">0.030863</Q><I unit="a.u.">906.78</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.4716</Idev></Idata>
<Idata><Q unit="1/A">0.031404</Q><I unit="a.u.">856.24</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.0677</Idev></Idata>
<Idata><Q unit="1/A">0.031945</Q><I unit="a.u.">813.36</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.8031</Idev></Idata>
<Idata><Q unit="1/A">0.032486</Q><I unit="a.u.">771</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.0596</Idev></Idata>
<Idata><Q unit="1/A">0.033027</Q><I unit="a.u.">772.45</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.0557</Idev></Idata>
<Idata><Q unit="1/A">0.033568</Q><I unit="a.u.">786.66</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.0839</Idev></Idata>
<Idata><Q unit="1/A">0.03411</Q><I unit="a.u.">823.33</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.6235</Idev></Idata>
<Idata><Q unit="1/A">0.034651</Q><I unit="a.u.">927.45</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.1564</Idev></Idata>
<Idata><Q unit="1/A">0.035192</Q><I unit="a.u.">1091.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.9016</Idev></Idata>
<Idata><Q unit="1/A">0.035734</Q><I unit="a.u.">1442.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.2056</Idev></Idata>
<Idata><Q unit="1/A">0.036275</Q><I unit="a.u.">1706.3</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.7983</Idev></Idata>
<Idata><Q unit="1/A">0.036817</Q><I unit="a.u.">1853.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.8893</Idev></Idata>
<Idata><Q unit="1/A">0.037358</Q><I unit="a.u.">1876.8</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.7876</Idev></Idata>
<Idata><Q unit="1/A">0.0379</Q><I unit="a.u.">1747</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.032</Idev></Idata>
<Idata><Q unit="1/A">0.038441</Q><I unit="a.u.">1517.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.3961</Idev></Idata>
<Idata><Q unit="1/A">0.038983</Q><I unit="a.u.">1499.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.3252</Idev></Idata>
<Idata><Q unit="1/A">0.039525</Q><I unit="a.u.">1130.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.5461</Idev></Idata>
<Idata><Q unit="1/A">0.040067</Q><I unit="a.u.">920.03</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.063</Idev></Idata>
<Idata><Q unit="1/A">0.040609</Q><I unit="a.u.">722.21</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.5364</Idev></Idata>
<Idata><Q unit="1/A">0.041151</Q><I unit="a.u.">680.68</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.5557</Idev></Idata>
<Idata><Q unit="1/A">0.041693</Q><I unit="a.u.">653.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.3218</Idev></Idata>
<Idata><Q unit="1/A">0.042235</Q><I unit="a.u.">682.98</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.2458</Idev></Idata>
<Idata><Q unit="1/A">0.042777</Q><I unit="a.u.">666.44</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.1228</Idev></Idata>
<Idata><Q unit="1/A">0.043319</Q><I unit="a.u.">687.15</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.5607</Idev></Idata>
<Idata><Q unit="1/A">0.043861</Q><I unit="a.u.">772.79</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.8899</Idev></Idata>
<Idata><Q unit="1/A">0.044404</Q><I unit="a.u.">831.62</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.1313</Idev></Idata>
<Idata><Q unit="1/A">0.044946</Q><I unit="a.u.">1068.8</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.3185</Idev></Idata>
<Idata><Q unit="1/A">0.045489</Q><I unit="a.u.">1286.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.1847</Idev></Idata>
<Idata><Q unit="1/A">0.046031</Q><I unit="a.u.">1561.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.1768</Idev></Idata>
<Idata><Q unit="1/A">0.046574</Q><I unit="a.u.">1705.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.8435</Idev></Idata>
<Idata><Q unit="1/A">0.047116</Q><I unit="a.u.">1661.8</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.5893</Idev></Idata>
<Idata><Q unit="1/A">0.047659</Q><I unit="a.u.">1700</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.4128</Idev></Idata>
<Idata><Q unit="1/A">0.048202</Q><I unit="a.u.">1649.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.1399</Idev></Idata>
<Idata><Q unit="1/A">0.048745</Q><I unit="a.u.">1415.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.0171</Idev></Idata>
<Idata><Q unit="1/A">0.049287</Q><I unit="a.u.">1046.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.8308</Idev></Idata>
<Idata><Q unit="1/A">0.04983</Q><I unit="a.u.">971.87</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.5672</Idev></Idata>
<Idata><Q unit="1/A">0.050373</Q><I unit="a.u.">831.44</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.4806</Idev></Idata>
<Idata><Q unit="1/A">0.050916</Q><I unit="a.u.">825.09</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.6425</Idev></Idata>
<Idata><Q unit="1/A">0.051459</Q><I unit="a.u.">906.13</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.1134</Idev></Idata>
<Idata><Q unit="1/A">0.052003</Q><I unit="a.u.">1107.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.0383</Idev></Idata>
<Idata><Q unit="1/A">0.052546</Q><I unit="a.u.">1418.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.8637</Idev></Idata>
<Idata><Q unit="1/A">0.053089</Q><I unit="a.u.">1848.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.7624</Idev></Idata>
<Idata><Q unit="1/A">0.054176</Q><I unit="a.u.">4488.3</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">15.654</Idev></Idata>
<Idata><Q unit="1/A">0.054719</Q><I unit="a.u.">6621.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">18.959</Idev></Idata>
<Idata><Q unit="1/A">0.055263</Q><I unit="a.u.">7222.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">19.776</Idev></Idata>
<Idata><Q unit="1/A">0.055806</Q><I unit="a.u.">7978.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">19.116</Idev></Idata>
<Idata><Q unit="1/A">0.05635</Q><I unit="a.u.">8765.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">20.568</Idev></Idata>
<Idata><Q unit="1/A">0.056893</Q><I unit="a.u.">8127.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">20.356</Idev></Idata>
<Idata><Q unit="1/A">0.057437</Q><I unit="a.u.">5563.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">17.398</Idev></Idata>
<Idata><Q unit="1/A">0.057981</Q><I unit="a.u.">4807</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">15.948</Idev></Idata>
<Idata><Q unit="1/A">0.058525</Q><I unit="a.u.">2857.8</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">12.017</Idev></Idata>
<Idata><Q unit="1/A">0.059069</Q><I unit="a.u.">1695.3</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.2211</Idev></Idata>
<Idata><Q unit="1/A">0.059613</Q><I unit="a.u.">1009.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.641</Idev></Idata>
<Idata><Q unit="1/A">0.060157</Q><I unit="a.u.">676.03</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.3701</Idev></Idata>
<Idata><Q unit="1/A">0.060701</Q><I unit="a.u.">632.65</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.1921</Idev></Idata>
<Idata><Q unit="1/A">0.061245</Q><I unit="a.u.">567.81</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.4243</Idev></Idata>
<Idata><Q unit="1/A">0.061789</Q><I unit="a.u.">594.02</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.6918</Idev></Idata>
<Idata><Q unit="1/A">0.062333</Q><I unit="a.u.">680.81</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.2001</Idev></Idata>
<Idata><Q unit="1/A">0.062878</Q><I unit="a.u.">870.55</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.1424</Idev></Idata>
<Idata><Q unit="1/A">0.063422</Q><I unit="a.u.">1109.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.8497</Idev></Idata>
<Idata><Q unit="1/A">0.063967</Q><I unit="a.u.">1277.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.1591</Idev></Idata>
<Idata><Q unit="1/A">0.064511</Q><I unit="a.u.">1402.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.4027</Idev></Idata>
<Idata><Q unit="1/A">0.065056</Q><I unit="a.u.">1410.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.9306</Idev></Idata>
<Idata><Q unit="1/A">0.0656</Q><I unit="a.u.">1356.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.7422</Idev></Idata>
<Idata><Q unit="1/A">0.066145</Q><I unit="a.u.">1318.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.6404</Idev></Idata>
<Idata><Q unit="1/A">0.06669</Q><I unit="a.u.">1080.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.2339</Idev></Idata>
<Idata><Q unit="1/A">0.067234</Q><I unit="a.u.">894.74</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.8117</Idev></Idata>
<Idata><Q unit="1/A">0.067779</Q><I unit="a.u.">641.97</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.0053</Idev></Idata>
<Idata><Q unit="1/A">0.068324</Q><I unit="a.u.">463.24</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.3458</Idev></Idata>
<Idata><Q unit="1/A">0.068869</Q><I unit="a.u.">450.9</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.2166</Idev></Idata>
<Idata><Q unit="1/A">0.069414</Q><I unit="a.u.">402.47</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.8343</Idev></Idata>
<Idata><Q unit="1/A">0.069959</Q><I unit="a.u.">372.02</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.5973</Idev></Idata>
<Idata><Q unit="1/A">0.070504</Q><I unit="a.u.">376.83</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.8965</Idev></Idata>
<Idata><Q unit="1/A">0.071049</Q><I unit="a.u.">411.75</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.0593</Idev></Idata>
<Idata><Q unit="1/A">0.071595</Q><I unit="a.u.">438.73</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.2162</Idev></Idata>
<Idata><Q unit="1/A">0.07214</Q><I unit="a.u.">536.13</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.235</Idev></Idata>
<Idata><Q unit="1/A">0.072685</Q><I unit="a.u.">655.45</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.893</Idev></Idata>
<Idata><Q unit="1/A">0.073231</Q><I unit="a.u.">836.69</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.7759</Idev></Idata>
<Idata><Q unit="1/A">0.073776</Q><I unit="a.u.">997.45</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.5455</Idev></Idata>
<Idata><Q unit="1/A">0.074322</Q><I unit="a.u.">1028.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.5489</Idev></Idata>
<Idata><Q unit="1/A">0.074868</Q><I unit="a.u.">1052.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.4162</Idev></Idata>
<Idata><Q unit="1/A">0.075413</Q><I unit="a.u.">1070.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.3716</Idev></Idata>
<Idata><Q unit="1/A">0.075959</Q><I unit="a.u.">985.79</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.5071</Idev></Idata>
<Idata><Q unit="1/A">0.076505</Q><I unit="a.u.">758.76</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.626</Idev></Idata>
<Idata><Q unit="1/A">0.077051</Q><I unit="a.u.">712.01</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.4339</Idev></Idata>
<Idata><Q unit="1/A">0.077596</Q><I unit="a.u.">528.53</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.1904</Idev></Idata>
<Idata><Q unit="1/A">0.078142</Q><I unit="a.u.">475.16</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.0759</Idev></Idata>
<Idata><Q unit="1/A">0.078688</Q><I unit="a.u.">456.37</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.1325</Idev></Idata>
<Idata><Q unit="1/A">0.079234</Q><I unit="a.u.">468.25</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.3377</Idev></Idata>
<Idata><Q unit="1/A">0.079781</Q><I unit="a.u.">545.19</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.6419</Idev></Idata>
<Idata><Q unit="1/A">0.080327</Q><I unit="a.u.">622.07</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.8079</Idev></Idata>
<Idata><Q unit="1/A">0.080873</Q><I unit="a.u.">805.98</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">6.4454</Idev></Idata>
<Idata><Q unit="1/A">0.081419</Q><I unit="a.u.">1169.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.116</Idev></Idata>
<Idata><Q unit="1/A">0.081966</Q><I unit="a.u.">1688.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">9.6851</Idev></Idata>
<Idata><Q unit="1/A">0.082512</Q><I unit="a.u.">2143.5</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.871</Idev></Idata>
<Idata><Q unit="1/A">0.083059</Q><I unit="a.u.">2646.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">11.079</Idev></Idata>
<Idata><Q unit="1/A">0.083605</Q><I unit="a.u.">2957.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">12.016</Idev></Idata>
<Idata><Q unit="1/A">0.084152</Q><I unit="a.u.">3193.4</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">12.825</Idev></Idata>
<Idata><Q unit="1/A">0.084698</Q><I unit="a.u.">2887.1</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">12.564</Idev></Idata>
<Idata><Q unit="1/A">0.085245</Q><I unit="a.u.">2660.7</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">11.899</Idev></Idata>
<Idata><Q unit="1/A">0.085792</Q><I unit="a.u.">2252</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">10.663</Idev></Idata>
<Idata><Q unit="1/A">0.086339</Q><I unit="a.u.">1557.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">8.7926</Idev></Idata>
<Idata><Q unit="1/A">0.086886</Q><I unit="a.u.">962.69</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">7.4052</Idev></Idata>
<Idata><Q unit="1/A">0.087433</Q><I unit="a.u.">551.34</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.7114</Idev></Idata>
<Idata><Q unit="1/A">0.08798</Q><I unit="a.u.">460.54</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">5.2721</Idev></Idata>
<Idata><Q unit="1/A">0.088527</Q><I unit="a.u.">339.2</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.2368</Idev></Idata>
<Idata><Q unit="1/A">0.089074</Q><I unit="a.u.">298.03</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.1142</Idev></Idata>
<Idata><Q unit="1/A">0.089621</Q><I unit="a.u.">280.61</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.142</Idev></Idata>
<Idata><Q unit="1/A">0.090168</Q><I unit="a.u.">287.28</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.2991</Idev></Idata>
<Idata><Q unit="1/A">0.090716</Q><I unit="a.u.">328.25</I><Qdev unit="1/A">0.00055</Qdev><Idev unit="a.u.">4.479</Idev></Idata>
		</SASdata>
		<SASsample>
			<ID>dry chick collagen, d = 673 A, 6531 eV, X6B</ID>
		</SASsample>
		<SASinstrument>
			<name>X6B, NSLS, BNL</name>
			<SASsource>
				<radiation>X-ray synchrotron</radiation>
				<wavelength unit="A">	1.898 <!-- = 12398/6531 --> </wavelength>
			</SASsource>
			<SAScollimation />
			<SASdetector>
				<name>X6B PSD</name>
			</SASdetector>
		</SASinstrument>
		<SASnote>
Sep 19 1994     01:41:02 am     Elt: 00090 Seconds 
ID: No spectrum identifier defined
Memory Size: 8192 Chls  Conversion Gain: 1024  Adc Offset: 0000 Chls

dry chick collagen, d = 673 A
6531 eV, X6B
		</SASnote>
	</SASentry>
</SASroot>

Validate your file

So you think you have an XML file. Let's validate it using the procedure from the documentation. All the instructions are on the documentation page. No sense in repeating them here.