how to use textattribute in BC

bersoft93bersoft93 Member Posts: 4
Does anyone know how to use the textattribute in an xmlport in vc...?

Best Answer

  • bersoft93bersoft93 Member Posts: 4
    Answer ✓
    Problem is solved:

    textattribute(Variable)
    {
    XmlName = 'VariableName';
    trigger OnBeforePassVariable();
    begin
    Variable := 'Sometext';
    end;
    }

Answers

  • bersoft93bersoft93 Member Posts: 4
    Answer ✓
    Problem is solved:

    textattribute(Variable)
    {
    XmlName = 'VariableName';
    trigger OnBeforePassVariable();
    begin
    Variable := 'Sometext';
    end;
    }
  • kylehardinkylehardin Member Posts: 257
    It creates a XML attribute that is a simple text string. Export Example:

    textelement(TE1) {}
    textattribute(TA1) {}
    textelement(TE2) {}
    trigger OnAfterGetRecord
    begin
    TE1 = 'Fighters;
    TA1 := 'Foo';
    TE2 := 'Rock';
    end;

    The resulting XML will look something like this (and I'm not sure this is legitimate XML syntax)

    <TE1 TA1="Foo">
    Fighters
    </TE1>
    <TE2>Rock</TE2>

    It has been my experience that I never ever have to use attributes. Elements are much more flexible and easy to follow.
    Kyle Hardin - ArcherPoint
  • bersoft93bersoft93 Member Posts: 4
    Thanks Kyle,
    I received a fixed layout and i need to add the correct attributes. Instead of elements they use attributes. :-(
Sign In or Register to comment.