EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Example XML

Posted: 01/17/2011 11:26:26
by Pedro Salgado (Standard support level)
Joined: 10/18/2010
Posts: 9

Hi everybody,

Is there any example how to create a simple XML document ?

For example some like :

<wsse:Reference URI="#SecurityToken-9f52cb84-5b89-4c42-9226-2f083256a319" valueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" />

Best regards.
Posted: 01/17/2011 11:58:24
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

The code will look like this:
  Doc : TElXMLDOMDocument;
  Base, n : TElXMLDOMNode;
  Attr : TElXMLDOMAttr;
  Doc := TElXMLDOMDocument.Create;

  Base := Doc.CreateElementNS('wsse:', 'wsse:SecurityTokenReference');
  Base := Doc.AppendChild(Base);

  n := Doc.CreateElementNS(Base.NamespaceURI, 'Reference');
  Attr := Doc.CreateAttribute('URL');
  Attr.Value := '#SecurityToken-9f52cb84-5b89-4c42-9226-2f083256a319';

  Attr := Doc.CreateAttribute('valueType');
  Attr.Value := 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3';





Topic viewed 830 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!