OK, I am not a programmer but I poke around enough until I can either do something myself or can't. I'm a the can't point with this one but I'm not willing to give up on what I am trying to do yet, so I am turning to the community for some help.
Goal: Use a script to parse the messages.xml file in the config directory so HSPhone message data can be loaded into devices for use in HSTouch.
I can handle to getting data into devices, I just don't know anything about working with XML. I looked at some of the scripts out there but they don't seem to be working with schemas (XSD I believe). If I just needed to find a given node I think I could do what I need. It's working with a schema that seems to have made this complicated past my abilities.
Can someone give me some pointers on writing some simple code to parse the messages.xml file and load into some variables in a script. I could take it from there. Here is what the messages.xml file looks like...
Thanks in advance!
FYI, I want to do this rather than the hsp.MBfirstunread() method as the message list is already there in the messages.xml file, sorted and also clearly identifies if the message was read or not (there is no hsp method to determine if a message is read or not).
Goal: Use a script to parse the messages.xml file in the config directory so HSPhone message data can be loaded into devices for use in HSTouch.
I can handle to getting data into devices, I just don't know anything about working with XML. I looked at some of the scripts out there but they don't seem to be working with schemas (XSD I believe). If I just needed to find a given node I think I could do what I need. It's working with a schema that seems to have made this complicated past my abilities.
Can someone give me some pointers on writing some simple code to parse the messages.xml file and load into some variables in a script. I could take it from there. Here is what the messages.xml file looks like...
HTML Code:
<xml xmlns:s='uuid:XXXXXX-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:XXXXXXXX-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'> <s:Schema id='RowsetSchema'> <s:ElementType name='row' content='eltOnly' rs:updatable='true'> <s:AttributeType name='CIDNumber' rs:number='1' rs:write='true'> <s:datatype dt:type='string' dt:maxLength='4294967295' rs:precision='0' rs:long='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='CIDName' rs:number='2' rs:write='true'> <s:datatype dt:type='string' dt:maxLength='4294967295' rs:precision='0' rs:long='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='FileName' rs:number='3' rs:write='true'> <s:datatype dt:type='string' dt:maxLength='4294967295' rs:precision='0' rs:long='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='HasBeenRead' rs:number='4' rs:write='true'> <s:datatype dt:type='boolean' dt:maxLength='2' rs:precision='0' rs:fixedlength='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='length' rs:number='5' rs:write='true'> <s:datatype dt:type='i8' dt:maxLength='8' rs:precision='0' rs:fixedlength='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='MailboxName' rs:number='6' rs:write='true'> <s:datatype dt:type='string' dt:maxLength='4294967295' rs:precision='0' rs:long='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='mdate' rs:number='7' rs:write='true'> <s:datatype dt:type='dateTime' rs:dbtype='variantdate' dt:maxLength='16' rs:precision='0' rs:fixedlength='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='tag' rs:number='8' rs:write='true'> <s:datatype dt:type='int' dt:maxLength='4' rs:precision='0' rs:fixedlength='true' rs:maybenull='false'/> </s:AttributeType> <s:AttributeType name='LineNum' rs:number='9' rs:write='true'> <s:datatype dt:type='int' dt:maxLength='4' rs:precision='0' rs:fixedlength='true' rs:maybenull='false'/> </s:AttributeType> <s:extends type='rs:rowbase'/> </s:ElementType> </s:Schema> <rs:data> <z:row CIDNumber='555555555' CIDName='Joe Smith' FileName='2010-07-29_10-08-45.wav' HasBeenRead='False' length='22' MailboxName='Default' mdate='2010-07-29T10:09:09' tag='3' LineNum='1'/> </rs:data> </xml>
FYI, I want to do this rather than the hsp.MBfirstunread() method as the message list is already there in the messages.xml file, sorted and also clearly identifies if the message was read or not (there is no hsp method to determine if a message is read or not).
Comment