You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.
Order online or call us +6282124422332 (WA Bussiness)
IDR
  • Empty!

Winsoft XML library

  • Brand: Winsoft
  • Product Code: Winsoft XML library
  • Availability: In Stock

Rp.1,300,000.00

Available Options


XML library

XML library

  • uses standard Windows XmlLite API
  • supports Windows 32 and Windows 64
  • available for Delphi/C++ Builder 7 - 10.4 and Lazarus 2.0.8
  • source code included in registered version
  • royalty free distribution in applications


Examples

// create XML document
with TXmlWriter.Create('document.xml') do
try
  Indent := True;
  StartDocument;
    StartElement('element1');

      Comment('comment');

      StartElement('element2');
        Attribute('attribute1', 'value1');
        Attribute('attribute2', 'value2');
        Text('Hello, world!');
      EndElement;

      StartElement('element3');
        CData('data');
      EndElement;

    EndElement;
  EndDocument;
finally
  Free;
end;

// parse XML document
var
  Text: string;
  I: Integer;

with TXmlReader.Create('document.xml') do
try
  while Read do
  begin
    Text := IntToStr(Line) + ',' + IntToStr(Position) + ': ' + NodeToString(Node);
    case Node of
      xnElement:
      begin
        Text := Text + ': ' + Name;
        Element;
        FirstAttribute;
        for I := 1 to AttributeCount do
        begin
          Text := Text + ' ' + Name + '=' + Value;
          NextAttribute;
        end;
      end;

      xnText: Text := Text + ': ' + Value;
      xnCData: Text := Text + ': ' + Value;
      xnComment: Text := Text + ': ' + Value;
      xnWhitespace: Text := Text + ': "' + Value + '"';
      xnEndElement: Text := Text + ': ' + Name;
      xnXmlDeclaration: Text := Text + ': ' + Name;
    end;
    ShowMessage(Text);
  end
finally
  Free;
end;





Write a review

Note: HTML is not translated!
    Bad           Good
Captcha

Tags: Winsoft XML library, delphi, c++ builder