I'm trying to write an interface to send scoreboard data from an XML
file generated by a football stats program to a Chyron CODi character
generator connected to my COM1 serial port (all operations on same
machine). I'm already able to send static commands written into HTTP
forms to control the CG via serial COM1.
What I'm needing is a way to read and parse variables from the XML,
then generate a CODi command string which can be written to the page as
the value of a hidden form INPUT attribute.
Some of the XML variables are free standing and require no parsing, but
the stats program writes <downtogo context="V,1,10,H10"> to represent
"possFlag,down,togo,ballOn".
"possFlag" will have to be logically parsed (if possFlag = "V" then
vPoss = "1", hPoss = ""; if possFlag = "H" then hPoss = "1", vPoss =
""), "down" will have to be parsed into an ordinal ("1st", "2nd",
"3rd", 4th", 5="OT") and "togo" simply has to be extracted 'as-is'.
For reference, CODi command string syntax for this display is:
\DB\2\R\022\230\230\230\0\032\230\230\230\0\\\TU\1 \Fox14\2\"vID"
"vPoss"\3\"vScore"\4\"hID" "hPoss"\5\"hScore"\6\"qtr"st Qtr\7\"down" &
"togo"\\
Since I'm not sending clock data to the CG on a realtime basis, I can
refresh the page after each play and send the CG command manually.
Although I've been playing with javascripts for more than 7 years, I
still consider myself a beginner. Thanks in advance for any help you
can offer.
Jim O'Malley / Station Manager / Fox14 Amarillo