txmldocument

Alternatives for XSLT transformations with Delphi XE8

感情迁移 提交于 2019-12-24 11:25:31
问题 I am trying to perform an XSLT transformation with Delphi XE8 and am running into problems. My XSL file refers to an external XSL file using an import statement whose href attribute has a relative path. The transform fails with the error "Named template 'skrivUtDate' does not appear in the stylesheet." The definition 'skrivUtDate' is located in the external XSL file. The definition looks like the following: <xsl:template name="skrivUtDate"> <xsl:param name="oppgittTid"/> <xsl:if test="string

Help to create gpx file with Delphi 7

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 01:58:08
问题 I'm Delphi newbie trying to create a GPX file like this, <?xml version="1.0" encoding="UTF-8" ?> - <gpx xmlns="http://www..." version="1.1" creator="EasyGPS 4.18" xmlns:xsi="http://www..." " xsi:schemaLocation="http://www..." > - <metadata> <bounds minlat="19.38975200" minlon="-99.17971000" maxlat="19.39671900" maxlon="-99.17543500" /> - <extensions> <time xmlns="http://www...">2011-02-20T01:51:38.662Z</time> </extensions> </metadata> - <wpt lat="19.39671900" lon="-99.17820800"> <time>2011-02

Alternative to TXMLDocument?

喜欢而已 提交于 2019-12-13 13:11:52
问题 Recently we upgraded our code from Delphi 2009 to Delphi XE and updated our Indy components (not sure if this is relevant). But ever since then we have had errors on Windows Server 2003 machines when loading and saving XML files. XMLDoc.LoadFromFile() XMLDoc.SaveToFile() The DLL msvcrt.dll is much smaller on Windows Server 2003 (300kb or so) compared to over 600kb on other operating systems... So its missing something in that file and its causing the error... Does anyone know how to fix this?

TXMLDocument.Active := False causes FastMM4 errormessage “FastMM detected that a block has been modified after being freed”

半城伤御伤魂 提交于 2019-12-12 19:21:27
问题 we have a strange effect using Delphi XE8 with FastMM4 (Version 4.992) in FullDebugMode. To reproduce the effect, just create a new TForm application, put FastMM4 in the first line of the DPR file, put a Button on the Form and put the following code in the clickhandler: (You need to have FastMM 4 installed, FullDebugMode must be enabled in the FastMM4Options.inc file and the FullDebugMode.dll has to be in the output folder of your programm!) procedure TForm3.Button4Click(Sender: TObject); var

string to xmlNode delphi (or how to add an xml fragment to TXMLDocument)

时间秒杀一切 提交于 2019-12-10 15:24:28
问题 I Have a few text strings that contain well formed XML. I would like to be able to (1) turn these strings into IXMLNodes then (2) append them to an existing XMLDocument . Preferably without declaring a new XMLDocument first. This doesn't seem possible? Is there any easy way to accomplish something equivalent though? My initial thought was to use the IXMLNode.XML (string) property and insert the new strings. No such luck as IXMLNode.XML is Read Only. Here is an example, if I had the following

Reading and writing into the XML file

吃可爱长大的小学妹 提交于 2019-12-06 12:18:51
问题 I need to work on XML files using Delphi. I want to present the xml data in a DBGrid to the user and save the changes done by user in the XML file. For example in the below xml (which was presented to the user), if user changed City of ABC under client and added a new customer with NickName as "AAA" those changes should be reflected in the XML file. <Data LinkID=”0”> <Client> <Item Name=”ABC” Mobile=”1234” City=”IN” /> <Item Name=”PQR” Mobile=”5678” City=”IN” /> </Client> <Customer> <Item

How do I add a namespace prefix to each node using TXMLDocument

点点圈 提交于 2019-12-02 01:33:17
问题 I used the XML Binding Wizard to create a descendant of TXMLDocument. The files generated by this class would declare the namespace in the root node and create just plain, unadorned nodes for the rest of the document. <?xml version="1.0"?> <RootNode xmlns="URL" xmlns:xsi="URL" xsi:schemaLocation="URL"> <SomeNode> <AnotherNode>Value</AnotherNode> </SomeNode> </RootNode> I've had no trouble reading or validating this at all. However, the processor where these files are sent now requires each

How do I add a namespace prefix to each node using TXMLDocument

和自甴很熟 提交于 2019-12-01 20:23:39
I used the XML Binding Wizard to create a descendant of TXMLDocument. The files generated by this class would declare the namespace in the root node and create just plain, unadorned nodes for the rest of the document. <?xml version="1.0"?> <RootNode xmlns="URL" xmlns:xsi="URL" xsi:schemaLocation="URL"> <SomeNode> <AnotherNode>Value</AnotherNode> </SomeNode> </RootNode> I've had no trouble reading or validating this at all. However, the processor where these files are sent now requires each node to have the namespace prefixed in order to process files correctly. <?xml version="1.0"?> <NS

Issue building an XML document using TXMLDocument

谁说胖子不能爱 提交于 2019-12-01 00:33:41
问题 I'm new to delphi and now I have to read create an xml. my code is the following: function foo.createXMLDocument(): TXMLDocument; var res: TXMLDocument; rootNode: IXMLNode; sl : TStringList; begin res := TXMLDocument.Create(nil); res.Active := true; rootNode := res.AddChild('label'); // create string for debug purposes sl := TStringList.Create; sl.Assign(res.XML);// sl is empty after this assignment //add more elements generateDOM(rootNode); Result := res; end; The problem is, the count of

Delphi - TXMLDocument created at run-time generates AV, with component on the form is working

半世苍凉 提交于 2019-11-28 03:29:58
问题 I'm creating an instance of TXMLDocument at runtime, to load and parse a XML file. You can check the code below: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, xmldom, XMLIntf, msxmldom, XMLDoc, StdCtrls; type Txml = class(TForm) // XMLDocument1: TXMLDocument; Memo1: TMemo; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var xml: Txml; implementation {$R *.dfm} procedure