jolly
VIP Member
Hi All,
I am developing some C++ code to interpret or modify XML documents that are being passed to or replied back from xmlCallObject... I'm using the tinyXML library for this just because... it's the first one I looked at and seems useful enough.
What I have noticed is that the BSFN parameters have a name-value pair, then the actual parameter value after that. For example:
<?xml version='1.0' encoding='UTF-8' ?>
<jdeRequest pwd='' role='*ALL' type='callmethod' user='' comment='' session='' environment='' sessionidle=''>
<callMethod app='XMLTest' name='GetAlphaNameFromAB'>
<returnCode code='0'/>
<params>
<param name='mnAddressNumber'>0</param>
<param name='szNameAlpha'></param>
</params>
</callMethod>
</jdeRequest>
When I work my way through this document with tinyXML I can grab an TiXmlElement for the <params> element, and within that iterate through the Attributes (TiXmlAttribute) for each Attribute. For each Attribute I can access the Name() which returns "name" and the Value() which returns "mnAddressNumber" or "szNameAlpha"... but I am interested in the bit after that - in the case if the mnAddressNumber, I want to set the 0 that is there to an address number for the request and in the case of szNameAlpha I want to grab the string there in the response... But I can't work out how that can be done... What is the term for that thing that comes after the attribute Value?
I think I'm missing something obvious here!
TIA for any advice!
JohnO
I am developing some C++ code to interpret or modify XML documents that are being passed to or replied back from xmlCallObject... I'm using the tinyXML library for this just because... it's the first one I looked at and seems useful enough.
What I have noticed is that the BSFN parameters have a name-value pair, then the actual parameter value after that. For example:
<?xml version='1.0' encoding='UTF-8' ?>
<jdeRequest pwd='' role='*ALL' type='callmethod' user='' comment='' session='' environment='' sessionidle=''>
<callMethod app='XMLTest' name='GetAlphaNameFromAB'>
<returnCode code='0'/>
<params>
<param name='mnAddressNumber'>0</param>
<param name='szNameAlpha'></param>
</params>
</callMethod>
</jdeRequest>
When I work my way through this document with tinyXML I can grab an TiXmlElement for the <params> element, and within that iterate through the Attributes (TiXmlAttribute) for each Attribute. For each Attribute I can access the Name() which returns "name" and the Value() which returns "mnAddressNumber" or "szNameAlpha"... but I am interested in the bit after that - in the case if the mnAddressNumber, I want to set the 0 that is there to an address number for the request and in the case of szNameAlpha I want to grab the string there in the response... But I can't work out how that can be done... What is the term for that thing that comes after the attribute Value?
I think I'm missing something obvious here!
TIA for any advice!
JohnO