And here is my code that I did not get finished. I had though about using a COM call, but was unsure where to look and never followed through with the thought.
 Code:
; begin KiXgolfUDF
;
;!
Function WFP($w)

Dim $L,$I[0],$C,$T,$Y[],$Z,$,$U[]

$wfp = "well-formed"
Open(6,$w)  
$L = Readline(6)

While @Error = 0
	$I[$C] = $L
	$C = $C + 1
	Redim Preserve $I[$C]
	$L = Readline(6)
Loop
close(6)

If $I[0] <> '<?xml version="1.0"?>'
	$T = 1
EndIf

For $C = 1 to Ubound($I)

	For $ = 1 to $I[$c] + 1 ^ 0 
		If SubStr($I[$C],$,1) = "<"
			$L = $
			While Substr($I[$C],$,1) <> ">"
				$ = $ + 1
			Loop
			Redim Preserve $Y[$Z]
			$Y[$Z] = Substr($I[$C],$L,($ +1) - $L)
			$Z = $Z + 1
		EndIf
	Next
Next

For $C = 0 to Ubound($Y)
	If left($Y[$C],2) <> "</" AND Left($Y[$C],2) <> 0
		$ = Left(Substr($Y[$C],2),-1) 
		$L = Ascan($Y,"</" + $ + ">",$C)
		If Ascan($Y,"<"+$+">",($C + 1)) < $L And Ascan($Y,"<"+$+">",($C + 1)) > -1
			$T = $T | 1
		EndIf

		If Instr($," ")
			If Instr($,"=") 
				$U = Split($,"=")
				If left($U[1],1) = CHR(34) AND INSTRREV($U[1],CHR(34)) > 1
					$ = Split($U[0])[0]
				Else
					$T = $T | 1	
				EndIf
			EndIf
		EndIf

		For $Z = 0 to Len($) -1
			Redim Preserve $U[$Z]
			$U[$Z] = Substr($,$Z +1,1)
		Next
		For each $L in $U
			$L = ASC($L)
			If $L > 44 AND $L < 58 OR $L > 64 AND $L < 91 OR $L > 96 and $L < 123
			Else
				$T = $T | 1
			EndIF
		Next

		$L = Ascan($Y,"</" + $ + ">",$C) 
		If $L > -1
			$y[$c] = 0
			$y[$L] = 0
		Else
			$L = Ascan($Y,"<" + Left($,-1) + "/>") 
			If $L > -1
				$y[$L] = 0
			Else
				$T = $T | 1
			EndIf
		EndIf

	EndIf
Next


If Instr(Join($y),"<")
	$T = $T | 1
EndIf

If $T <> 0
 $wFP = "non " + $wFP

EndFunction
;!
;!
; end KiXgolfUDF


Edited by Gargoyle (2008-12-20 06:34 PM)
Edit Reason: didn't like the html post
_________________________
Today is the tomorrow you worried about yesterday.