Skip to content

AddNode missing mechanism to add multiple children to same root? #2

@killnine

Description

@killnine

I'm trying to understand the fluent syntax and am wondering about how to replicate this sort of a structure:

<StrippingParams ID="TheStrippingParams" Class="Parameter" Status="Available" WorkStyle="WorkAndBack">
        <GeneralID IDUsage="press-type" IDValue="e1e2HP‐T400" />
        <GeneralID IDUsage="production-mode" IDValue="inline"/>
        <MediaRef rRef="TheBlankPaper"/>
        <BinderySignatureRef rRef="TheBinderySignature"/>
        <Position RelativeBox="0 0 1 1" Orientation="Flip180"/>
</StrippingParams>

When doing something like this:

.WithInput().StrippingParams("TheStrippingParams").With().Attribute("Class", "Parameter").Attribute("Status", "Available")
                        .AddNode("GeneralID").With().Attribute("IDUsage", "press-type").Attribute("IDValue", "e1e2HP-T400")
                        .AddNode("GeneralID").With().Attribute("IDUsage", "production-mode").Attribute("IDValue", "inline")
                        .AddNode("MediaRef").With().Attribute("rRef", "TheBlankPaper")
                        .AddNode("BinderySignatureRef").With().Attribute("rRef", "TheBinderySignature")
                        .AddNode("Position").With().Attribute("RelativeBox", "0 0 1 1").Attribute("Orientation", "Flip180")

It, instead, nests the child nodes (as I'd kinda expect, but wish it didn't do in this case).

<StrippingParams Class="Parameter" ID="TheStrippingParams" Status="Available">
    <GeneralID IDUsage="press-type" IDValue="e1e2HP-T400" xmlns="">
      <GeneralID IDUsage="production-mode" IDValue="inline">
        <MediaRef rRef="TheBlankPaper">
          <BinderySignatureRef rRef="TheBinderySignature">
            <Position Orientation="Flip180" RelativeBox="0 0 1 1"/>
          </BinderySignatureRef>
        </MediaRef>
      </GeneralID>
    </GeneralID>
</StrippingParams>

Is there a way to add multiple child nodes to StrippingParameters that I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions