how to print newline in xml?

anatoli.barski at anatoli.barski at
Thu Jun 1 09:04:26 CEST 2006

Thank you for a possible solution, but it's not what I'm looking for,
cause something like <!-- comment --> would look quite similar... for
big elements like robot it would be ok to use comment as a child of
element - but imagine I'd like to comment transformation:

<transformation x="0" y="0" z="0"/> I wouldn't like to make this
element parent of a description - it is not nice - I have lots of such

It is important that a user after having a glance at the document is
able to quickly find and change some values. I don't want to bother him
with reading documentation nodes - but if he needs - they should be
there... the only possible solution I can think of would be:

  <verbose mode="enabled"/>                    <!-- enabled, disabled
  <CollisionChecker type="vcollide"/>          <!-- possible values for
type: vcollide, (nyi: disabled) -->
  <Visualisation mode="3DModel"/>              <!-- posiible values for
mode: 3DModel, (nyi: disabled, line) -->

<!--  <Offset eulerX="-90" eulerZ="90"/> -->

  <RootJoint>                                  <!-- the one and only
root joint -->
    <Name value="Armar3"/>                    <!-- name of this joint
    <DH>                                       <!-- Denavit Hartenberg
parameters -->
      <alpha value="0"/>

    <ID value="0"/>                            <!-- unique ID of this
joint -->
    <ChildNodes childID="1"/>                  <!-- all child joints of
this joint -->

    <Name value="Platform"/>
      <RotationAxis X="0" Y="0" Z="1" INIT="0"/>
      <TranslationFromParent X="0" Y="0" Z="0"/>
    <Visualisation>                           <!-- visualisation
settings for this joint -->
      <IVModel file="model/platform.iv"/>      <!-- filename of full 3d
model -->
    <ID value="1"/>                             <!-- unique ID of this
joint -->
    <ChildNodes childID="2"/>                  <!-- all child joints of
this joint -->

> How about:
> <robot>
>     <description>armar3</description>
>     :
>     :
> </robot>
> XML editor + xpath makes this way more easier to use by humans compared to
> normal comments. Also, if you declare several of comment elements
> (summary, description, author, etc.) you can auto generate documentation
> etc.
> --
> John                               MexIT:
>                            personal page:
>         Experienced programmer available:
>             Happy Customers:

More information about the Python-list mailing list