Questions tagged [txmldocument]

The wrapper class for process XML documents in Embarcadero Delphi programming environment. Dangerous for novices! Read the documentation!

The class is a front-end to several existing XML engines, depending on the operating system and other environment factors.

The class works in both reference-counted and explicit programmer-controlled memory management schemes at the same time.

This is very contrast to the usual behavior of Delphi stock and 3rd-party libraries and drives not yet bitten developers into repeating the same old faux pas endless times.

etc.

Hopefully with this wiki page created, at least that specific trouble would be less often repeated. At least for those developers, caring to fill the tags.

47 questions
3
votes
1 answer

How do I get encoding = "utf-8"?> in a txmldocument.xml?

This doesn't work for me in Delphi XE2. Var XMLDoc : IXMLDOCUMENT; begin XMLDoc := NewXMLDocument; XMLDoc.Active := True; XMLDoc.Version := '1.0'; XMLDoc.Encoding := 'utf-8'; XMLDoc.Options := [doNodeAutoIndent]; Memo1.Text :=…
Freddie Bell
  • 2,186
  • 24
  • 43
3
votes
1 answer

Adding the same IXMLNode multiiple times in a TXMLDocument

I've noticed that it is possible to add the same node multiple times into the same TXMLDocument - is this a good idea? n := XMLDocument1.CreateElement('Test', ''); XMLDocument1.DocumentElement.ChildNodes.Add(n); …
Alister
  • 6,527
  • 4
  • 46
  • 70
2
votes
3 answers

Help to create gpx file with Delphi 7

I'm Delphi newbie trying to create a GPX file like this, - -
2
votes
1 answer

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

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…
2
votes
1 answer

Unexpected result in TXMLDocument

I attempt to create a xml document to access a webservice. I'm having trouble getting the result xml beeing like i want it to. :-) This is my delphicode to create this document. xmlQuery.Active := true; xmlQuery.Version := '1.0'; …
Sjubussen
  • 51
  • 1
  • 8
2
votes
1 answer

Delphi: EInvalidPointer when trying to access XMLDocument

The following code throws an "InvalidPointer" exception everytime I try to access the document's root with XMLDocument.DocumentElement;. begin XMLDocument := TXMLDocument.Create(nil); // nil since we don't need an owner AStream :=…
chollinger
  • 1,097
  • 5
  • 20
  • 34
2
votes
1 answer

Does the poAsyncLoad option do anything on a TXMLDocument?

I've been playing around with TXMLDocument and I've been trying to work out what poAsyncLoad does in ParseOptions. The help indicates that it might improve performance on large XML files (which it doesn't seem to). The name indicates that it…
Alister
  • 6,527
  • 4
  • 46
  • 70
2
votes
3 answers

Delphi - XML - childnodes - getting attributes

I am trying to get the correct data from a twitter atom/xml feed. I have the twitter data in a txmldocument and am trying to get some specific information from it. Here is a truncated example of the data:
Dan Shelton
2
votes
1 answer

Read URL from XML data

Using Delphi 2010 I want to read the URL's for Location, Smartcard_Location and Integrated_Location from the following XML sample data (I left out parts I don't need) using TXMLDocument:
Remko
  • 7,214
  • 2
  • 32
  • 52
1
vote
2 answers

How to construct a Soap Envelope manually using TXMLDocument (Delphi 2006)

I've been having this problem for a long time now and I cannot solve it my self. I've tried searching Google, Bing and stackOverflow too? No luck... I'm trying to construct a soap header manually using the TXMLDocument component of Delphi 2006: …
Brian Andersen
  • 65
  • 1
  • 10
1
vote
3 answers

How to read a floating point value correctly from an XML file independently from regional settings?

I am reading a floating point attribute value from a node in an XML file with TXMLDocument: ...with this statement: var ThisRootNode: IXMLNode; ThisVersion: Single; // ... ThisVersion :=…
user1580348
  • 5,721
  • 4
  • 43
  • 105
1
vote
1 answer

Reading and writing into the XML file

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…
Bharat
  • 6,828
  • 5
  • 35
  • 56
1
vote
1 answer

Can MSXML XPath select attributes? ( UPD: real issue was with default no-prefix namespace )

I want to try parsing Excel XML Spreadsheet file with MSXML and XPath. https://technet.microsoft.com/en-us/magazine/2006.01.blogtales https://msdn.microsoft.com/en-us/library/aa140066.aspx It has a root element of
Arioch 'The
  • 15,799
  • 35
  • 62
1
vote
2 answers

new TXMLDocument in Borland C++ Builder

Is it possible for me to create and destroy a TXMLDocument by myself in Borland C++ Builder? I've tried but borland keeps telling me that TXMLDocument is (and must be) an IDE managed component. Also, the only reason that I want to do this is that…
c0m4
  • 4,343
  • 10
  • 35
  • 40