Jump to content

AndrewHoward

Members
  • Content Count

    34
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Can I use managed C# DLL in unmanaged Delphi application ? Thanks
  2. AndrewHoward

    Importing WSDL

    Hi All, How do I import this WSDL: ? http://www.onvif.org/ver20/ptz/wsdl/ptz.wsdl I'd like to import it using Delphi Tokyo. I tried File -> New -> Other -> WSDL Importer -> enter the above link but I get an error. TIA
  3. AndrewHoward

    Type within a class

    Thank you very much.
  4. AndrewHoward

    Delphi to access & control IP camera

    Hi all, I'd like to use Delphi to access & control IP-cameras with the Onvif protocol. Can anyone help me with guidance notes & examples ? I'm using Delphi 10.2 Thank you.
  5. Hi all, How do I get list bluetooth devices ? Thanks
  6. Hi, Could someone explain this code: type TDataContainer = class public type TIterateAction = reference to procedure (value: integer); strict private FData: TArray<integer>; FIndex: integer; public constructor Create(const data: TArray<integer>); procedure Iterate(action: TIterateAction); function GetFirst(var value: integer): boolean; function GetNext(var value: integer): boolean; end; I don't understand the role of "type" after public and before the anonymous method type declaration? public type Doesn't it require a matching "end" ? Thanks
  7. AndrewHoward

    namespace in XML

    That works! Thank you.
  8. AndrewHoward

    namespace in XML

    Is it possible to get exactly this:? <?xml version="1.0"?> <ab xmlns:xsi="https://www.guru99.com/XMLSchema-instance" xmlns:xsd="https://www.guru99.com/XMLSchema" xmlns="MyString"> <founder>Krishna</founder> </ab> I tried different things but I couldn't get this line without xmlns="" : <founder>Krishna</founder>
  9. AndrewHoward

    namespace in XML

    This is what I'm getting: <?xml version="1.0"?> <ab xmlns:xsi="https://www.guru99.com/XMLSchema-instance" xmlns:xsd="https://www.guru99.com/XMLSchema" xmlns="MyString"> <founder xmlns="">Krishna</founder> </ab> Is it possible to have the same as above but the founder node like this:? <founder>Krishna</founder> Thank you.
  10. AndrewHoward

    Validating an XML using XSD

    Thank you.
  11. AndrewHoward

    namespace in XML

    Thank you. This is what I got: <?xml version="1.0"?> <ab xmlns:xsi="https://www.guru99.com/XMLSchema-instance" xmlns:xsd="https://www.guru99.com/XMLSchema" xmlns="MyString"> <founder xmlns="">Krishna</founder> </ab> How to get rid of xmlns="" in <founder xmlns="">Krishna</founder> Thank you.
  12. AndrewHoward

    namespace in XML

    How can I generate this XML ? I am interested in the ab node & the xsi, xsd & MyString <?xml version="1.0"?> <ab xmlns:xsi="https://www.guru99.com/XMLSchema-instance" xmlns:xsd="https://www.guru99.com/XMLSchema" xmlns="MyString"> <founder>Krishna</founder> </abt> This is what I tried: procedure TForm1.Button11Click(Sender: TObject); var MyXMLDocument : IXMLDocument; FounderNode : IXMLNode; begin MyXMLDocument := TXMLDocument.Create(nil); MyXMLDocument.Active := true; MyXMLDocument.DocumentElement := MyXMLDocument.CreateNode('ab', ntElement,''); MyXMLDocument.DocumentElement.DeclareNamespace('xsi', 'https://www.guru99.com/XMLSchema-instance'); MyXMLDocument.DocumentElement.DeclareNamespace('xsd', 'https://www.guru99.com/XMLSchema'); MyXMLDocument.DocumentElement.SetAttributeNS('xmlns', 'MyString',''); FounderNode := MyXMLDocument.DocumentElement.AddChild('founder'); MyXMLDocument.SaveToFile('TestOne01.XML'); MyXMLDocument.Active := false; end; This is what I'm getting: <ab xmlns:xsi="https://www.guru99.com/XMLSchema-instance" xmlns:xsd="https://www.guru99.com/XMLSchema" xmlns=""> <founder/> </ab> why xmlns="MyString" isn't being generated ? Why this is missing ? <?xml version="1.0"?> Thank you
  13. AndrewHoward

    validate XML against XSD

    Hi, This code validates XML against XSD but it returns the first error. How can I make it return all erros in XML in one go ? Thank you. function TXmlValidator.ValidateXml(const XmlFileName: string; const SchemaCollection: IXMLDOMSchemaCollection2): Boolean; var XmlDocument: IXMLDOMDocument3; parseError: IXMLDOMParseError; begin XmlDocument := TmsxmlFactory.CreateXMLDOMDocument3WithValidateOnParseFromFile(XmlFileName); XmlDocument.schemas := SchemaCollection; parseError := XmlDocument.validate(); FValidationResult := TXMLDOMParseErrorToString.ToString(parseError); Result := ValidationResult = NullAsStringValue;; end;
  14. AndrewHoward

    Validating an XML using XSD

    That's very helpful. Thank you very much ZDeveloper. Could you tell me what's the defenition of this type: IXMLFLK_PType Thanks again.
  15. AndrewHoward

    Validating an XML using XSD

    Hello, Does anyone have an example on how to validate an XML using an XSD file in Delphi ? I would like to get data from database & build an XML which needs to be valid. Thank you.
×