<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><br class="" style=""><div style=""><div class="" style="">On 11 Aug 2008, at 20:12, Mark Overmeer wrote:</div><br class="Apple-interchange-newline" style=""><blockquote type="cite"><div class="" style="">* Drew Taylor (<a href="mailto:drew@drewtaylor.com">drew@drewtaylor.com</a>) [080811 17:16]:<br class="" style=""><blockquote type="cite"><br class="" style=""></blockquote><br class="" style="">mixed elements are a pain, because... they are not structured as a<br class="" style="">HASH or ARRAY... a mixed mess. &nbsp;</div></blockquote><div style=""><br class="" style=""></div><div style="">Indeed they are!</div><br class="" style=""><blockquote type="cite"><div class="" style="">You have (since release 0.89) the<br class="" style="">options<br class="" style=""> &nbsp;. mixed_elements => STRUCTURED<br class="" style=""> &nbsp;&nbsp;&nbsp;to ignore the "mixedness" of them (may make exceptions with hooks)<br class="" style=""> &nbsp;&nbsp;&nbsp;ignoring the text between elements.<br class="" style=""></div></blockquote><br class="" style=""><div style="">From my code diving yesterday, it's worth mentioning that the mixed_elements => STRUCTURED option stops everything for the Writer. &nbsp;It would be useful to have since on my requests I have no mixed content and can easily ignore what's not there. Actually, I had a question about this code in Translate::Writer::makeMixedElement():<span class="Apple-style-span" style="-webkit-text-stroke-width: -1; "></span></div><div style=""><br class="" style=""></div><div style="">&nbsp;&nbsp;elsif($mixed eq 'STRUCTURAL')</div><div style="">&nbsp;&nbsp;{ # mixed_element eq STRUCTURAL is handled earlier</div><div style="">&nbsp;&nbsp; &nbsp;panic "mixed structural handled as normal element";</div><div style="">&nbsp;&nbsp;}</div><div style=""><br></div><div style="">Where is STRUCTURAL handled earlier? I didn't see anything obvious from the stack trace.</div><div style=""><br></div><blockquote type="cite"><div class="" style=""><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Both nicely structured.&nbsp;</span>In most schema's I have seen, "mixed" was abused.</div></blockquote><div style=""><br class="" style=""></div><div style="">Unfortunately the responses do have mixed content. IMHO the schema I'm working with is very complicated, in contrast with the large but sane schema (TORIX) we're using at $work for our API. Luckily I'm only implementing two of the messages.</div><div style=""><br class="" style=""></div><div style=""><span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 11px; white-space: pre-wrap; ">&lt;Price Role="Supplement">blah blah&lt;Segment Ref="CELASSGS"/>
  &lt;Amounts>
    &lt;Amount Quantity="1" Target="Unit" Value="3000"/>
    &lt;Amount Target="Total" Value="3000"/>
  &lt;/Amounts>
&lt;/Price></span></div><div style=""><font class="Apple-style-span" face="'Lucida Grande'" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;"><br class="" style=""></span></font></div><blockquote type="cite"><div class="" style=""><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">Is there a &nbsp;</span></blockquote><blockquote type="cite">shortcut I can use to reduce the boiler plate I'd be using to generate &nbsp;<br class="" style=""></blockquote><blockquote type="cite">the XML nodes? How are other people handling mixed schemas?<br class="" style=""></blockquote><br class="" style="">XML::Simple::XMLout() ? &nbsp;&nbsp;Probably not.<br class="" style=""></div></blockquote><br class="" style=""></div><div style="">Interesting idea. I think XML::LibXML::Simple could be useful on the server side to generate the request. I might see the effort involved in writing XML::LibXML::Simple::XMLout()...</div><div style=""><br></div><div style="">Drew</div></body></html>