Jump to content

Search the Community

Showing results for tags 'xml'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 8 results

  1. karl Jonson

    XML validation

    XML validation. I have an Object Pascal application which generates XML similar to this one: <book> <name>Anna Karenina</name> <author>Leo Tolstoy</author> <publisher>The Russian Messenger</publisher> <price>$16.79</price> </book> Which is the best way to add code which validates the above XML (in the generating app) ? I would like to make sure that: A book must have an author. A book price cannot exceed $100 TIA
  2. Hello, Is it possible to read XML processing instructions using TXMLDocument? Assuming XML I am trying to parse is as follows <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="xsl_for_this_xml.xslt"?> <DATA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </DATA> I am trying to read "href" value in "xml-stylesheet". I will parse it as text if this is not possible to read using existing XML routines in Delphi. Thanks & Regards, Ertan
  3. Perpeto

    --solved--

    Nevermind.. solved the issue.. !
  4. I have an XML file produced by Media Companion for a movie, I have used the Data Binding wizard to produce a schema from a dtd file. I can retrieve almost all the details from the file except when there is a list. <uniqueid type="tmdb">745272</uniqueid> <uniqueid type="imdb" default="true">tt13095604</uniqueid> How do I retreive the value for uniqueid>imdb I cannot find any assistance via google that explains this situation. Or am I missing something really simple I have attached the files The Phenomenon (2020).nfo is the XML file cm_movieinfo.dtd is the Document Schema cm_movieinfo.xdb is the generated Delphi Data Binding Unit. cm_movieinfo.dtd The Phenomenon (2020).nfo cm_movieinfo.xdb
  5. The Delphi WSDL Importer has done an impressive job of taking a (local) WSDL file and generating some very useful code (that almost works!) To debug, I have looked at the outgoing request with Fiddler, and based on this, I've been able to alter the WSDL file to effect a required change in the request header. However, the problem remains that Delphi is generating a tag with "NAV_CustomerItemPriceV1" but the server needs "ReadMultiple" - ( which seems sensible of Delphi as the resource that it uses is called NAV_CustomerItemPriceV1) Despite further manual changes to the WSDL and to the code generated by Delphi, I can't force a change in this tag. I have seen posts where people have suggested intercepting the XML, but I'm not sure how to do this (or how to access the events on THTTPRIO) TIA Incorrect: <NAV_CustomerItemPriceV1 xmlns="http://tempuri.org/"> <customerNo>account_no</customerNo> <apiKey>api_key</apiKey> <itemList> <Item No="T14727IO" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> <Item No="ZT62062-T1E0100Z" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> </itemList> </NAV_CustomerItemPriceV1> Correct: <ReadMultiple xmlns="http://tempuri.org/"> <customerNo>account_no</customerNo> <apiKey>api_key</apiKey> <itemList> <Item No="T14727IO" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> <Item No="ZT62062-T1E0100Z" xmlns="urn:microsoft-dynamics-nav/xmlports/NAV_CustomerItemPriceV1" /> </itemList> </ReadMultiple>
  6. Check out some of the interesting algorithms and data structures used to create an extremely light-weight XML DOM. https://blog.grijjy.com/2020/10/07/an-xml-dom-with-just-8-bytes-per-node/
  7. The .Net DLL/WSDL Import Utility for Delphi is used for importing .Net assemblies as dll files, WSDL or web service XML schema and generates Delphi classes from the types of the imported assemblies. The Import .Net Assemblies Wizard is used for importing .net assemblies and generating Delphi classes from the types of the imported assemblies. The Import WSDL/Web Services Wizard is also used for importing Web Service Description language file/url or XML schema that describes a web service and generates Delphi classes from the types of the imported WSDL assemblies. Features Import any .Net Libraries. Import any assemblies from the Global Assembly Cache (GAC). Import any Web Services Definition Language(WSDL). Uses the Host Class Library and the Framework Class library to host the .net runtime (CLR) and access the imported assemblies or WSDL without registering the .net dll as COM. For more information, go to https://crystalnet-tech.com/RuntimeLibrary/RuntimeLibUtilities. For more information about the .Net Runtime Library for Delphi (which the .Net DLL/WSDL Import Utility for Delphi is part of), go to https://www.crystalnet-tech.com/RuntimeLibrary/RuntimeLibrary4Delphi
  8. ertank

    XML FindNode

    Hello, Using Delphi 10.2.3. I have attached xml file. I would like to find specific node (if it exists) in it and retrieve it's value. My node existence check list is: 1- AdditionalDocumentReference (This is an optional node. Can be more than once in XML. I have to loop through all of them to be sure that node I am searching for exists or not. If no such node exists, searched node is certainly not exists) 2- DocumentType = XSLT (I am seaching DocumentType to be "XSLT". if current node is something else, I need to check other AdditionalDocumentReference nodes if there is any) 3- EmbeddedDocumentBinaryObject (I need Base64 encoded string of that node) My current code is: uses Xml.OmniXmlDom, // <- this is for Omni XML (only available in XE7 and higher!) Xml.XmlDom, // <- add this (important, otherwise the var DefaultDOMVendor isn’t available) Using "Omni XML" as default DOM provider Xml.XmlDoc, Xml.XmlIntf; procedure DisplayInvoice(const Filename: string); var Xml: IXmlDocument; ElementNode: IXMLNode; BaseNode: IXMLNode; ChildNode: IXMLNode; XSLTBase64: string; begin if not TFile.Exists(Filename) then Exit(); Xml := TXMLDocument.Create(Filename); ElementNode := Xml.ChildNodes.FindNode('Invoice'); if ElementNode <> nil then begin BaseNode := ElementNode.ChildNodes.FindNode('cac:AdditionalDocumentReference', 'http://www.w3.org/2001/XMLSchema-instance'); // <--- here BaseNode returns nil if BaseNode <> nil then begin ChildNode := BaseNode.ChildNodes.FindNode('DocumentType'); if ChildNode <> nil then begin if ChildNode.Text.ToUpper = 'XSLT' then begin ChildNode := BaseNode.ChildNodes.FindNode('Attachment'); if ChildNode <> nil then begin ChildNode := ChildNode.ChildNodes.FindNode('EmbeddedDocumentBinaryObject'); if ChildNode <> nil then begin XSLTBase64 := ChildNode.Text; end; end; end; end; end; end; end; Above code does not take into account multiple AdditionalDocumentReference as I failed to have a working code in the first place. I have also tried not to use namespaces when using FindNode and that also failed. Any help is appreciated. Thanks & regards, Ertan ubl-tr.xml
×