Boost logo

Boost Users :

Subject: [Boost-users] [Spirit] xml parse tree printing double leaf node
From: HT4N - (ht4n_at_[hidden])
Date: 2009-10-31 14:29:57


When I generating parse tree and dump it using the built-in tree-to-xml function, even from a simple grammar, I wonder why it prints out the leaf node twice.

 

For instance:

 

Parameter = ParameterName >> ParameterValue;

 

The tree it prints it looks more or less like the following (note the repetition of ParameterName and ParameterValue nodes):

 

<Parameter>

     <ParameterName>

            <ParameterName>

                    <value>Foo</value>

            </ParameterName>

     </ParameterName>

     </ParameterValue>

            <ParameterValue>

                    <value>Bar</value>

            </ParameterValue>

     </ParameterValue>

</Parameter>

     

I would be expecting more something like:

 

<Parameter>

     <ParameterName>

           <value>Foo</value>

     </ParameterName>

     </ParameterValue>

           <value>Bar</value>

     </ParameterValue>

</Parameter>

     

 

Is there any directive or secret that I don't know ?

 

Thanks

 

HT
                                               
_________________________________________________________________
Windows 7: I wanted more reliable, now it's more reliable. Wow!
http://microsoft.com/windows/windows-7/default-ga.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:102009



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net