Android Question xmlbuilder indentation

mterveen

Member
Licensed User
Longtime User
when i use the following code:

B4X:
    Dim props As Map
    props.Initialize
    props.Put("indent", "yes")
    Return x.asString2(props)

(with x being my xmlbuilder variable)

and save x to a file, the data is NOT indented. what determines where the indentations are/should be?

here is a snippet of some of the xmlbuilder code

B4X:
            .e("NumberFontSize").t(G.numberfontsize).up _
            .e("OrgGaugeRectangle") _
                .e("Location") _
                    .e("X").t(G.orggaugerectangle_location_x).up _
                    .e("Y").t(G.orggaugerectangle_location_y).up _
                    .up _
                .e("Size") _
                    .e("Width").t(G.orggaugerectangle_size_width).up _
                    .e("Height").t(G.orggaugerectangle_size_height).up _
                    .up _
                .e("X").t(G.orggaugerectangle_location_x).up _
                .e("Y").t(G.orggaugerectangle_location_y).up _
                .e("Width").t(G.orggaugerectangle_size_width).up _
                .e("Height").t(G.orggaugerectangle_size_height).up _
                .up _
 

mterveen

Member
Licensed User
Longtime User
will do - should i use this new code in addition to the props.put("indent", "yes") code or as a replacement?
 
Upvote 0
Top