![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 6 of 6 total |
![]() |
Wed, May 29 2013 12:55 PM | Permanent Link |
matthewk | Without XMLSerializer, how can I get the XML that has been built with a TDocument?
|
Thu, May 30 2013 4:45 AM | Permanent Link |
Matthew Jones | Search back for getDOMfromXMLstring and it may give you what you need. If not, more
detail please? /Matthew Jones/ (Just an EWB user) |
Thu, May 30 2013 5:22 AM | Permanent Link |
matthewk | OK, that's not quite what I needed, but shows how to do it, so thanks. For the record:
function getXMLStringFromDocument(doc) { return new XMLSerializer().serializeToString(doc); } and: external function getXMLStringFromDocument(doc : TDocument): String; |
Thu, May 30 2013 1:29 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< OK, that's not quite what I needed, but shows how to do it, so thanks. For the record: >> IE9 and lower is going to have an issue with that. For those browsers, you can just examine the xml property of the node (or document). This is already defined in the WebDOM unit, and I'll add the XMLSerializer interface for 1.02, and this is what it will look like: WebDOM: external TXMLSerializer = class public { Methods } function serializeToString(node: TNode): String; end; WebCore: function SerializeXML(Document: TDocument): String; var TempSerializer: TXMLSerializer; begin if (IsIE and (not IsIEHTML5)) then Result:=Document.xml else begin TempSerializer:=TXMLSerializer.Create; try Result:=TempSerializer.serializeToString(Document); finally TempSerializer.Free; end; end; end; Tim Young Elevate Software www.elevatesoft.com |
Fri, May 31 2013 5:37 AM | Permanent Link |
matthewk | Thank you. By the way https://developer.mozilla.org/en/docs/XMLSerializer says that it is supported in IE9.
|
Fri, May 31 2013 3:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Matthew,
<< Thank you. By the way https://developer.mozilla.org/en/docs/XMLSerializer says that it is supported in IE9. >> Sorry about that. Yes, I was incorrect and forgot to correct my statement (the code was correct, though ![]() There was some mention online that IE9 implements the object but not the serializeToString method, but that was apparently wrong. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, February 14, 2025 at 12:13 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |