Menu

DeclareNameSpace how to?

2016-03-01
2016-03-02
  • Grigoriy Poverenniy

    Hello!

    How to declare namespace in OXmlPDOM or OXmlCDOM?

     
  • Ondrej Pokorny

    Ondrej Pokorny - 2016-03-01

    IMO you just can declare the tags. Doesn't it work?

     
  • Grigoriy Poverenniy

    XmlNode has NameSpaceExists(const aNameSpaceURI, aNameSpacePrefix: OWideString) how to declare in node NameSpaceURI with NameSpacePrefix?

    Demo file attached.

     
  • Grigoriy Poverenniy

    It work

      doc := TXMLDocument.Create();
      doc.DocumentElement := doc.CreateElement('root');
    
      doc.DocumentElement.Attributes['xmlns:ns2'] := 'urn://x-artefacts-rosreestr-ru/commons/complex-types/numbers/1.0';
    
      nd := doc.DocumentElement.AddChild('ns2:sssss');
      ShowMessage(nd.NameSpaceURI);
    
     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.