Menu

Adding a optional elements in AsmXml Schema

2009-09-15
2013-04-23
  • Nobody/Anonymous

    Hi szentesik,

    Could you please tell me how to specify optional elements in Asmxml schema. Also please tell me how to extract the value of an element.
    For example: <name>xyz</name> In this how to extract the value of "name" (not xyz) to a string variable using AsmXml firstchild, nextSibbling, attributes.begin, limit and so on…

     
  • Krisztian Szentesi

    Hello,

    a good example for iterating through a schema with optional element is in . If there are optional nodes, the id tag should be used to map the schema and the parsed data together. The XML key name is to identify also with the id.

    E.g. in parsing an established event, if node->id==13, than the key name of current node is "associatedCalledDevice" (and no node with this id is present when field not specified in XML.).

      : http://cstainside.svn.sourceforge.net/viewvc/cstainside/CSTAInsideCore/EstablishedEvent.cpp?view=markup

     

Log in to post a comment.