 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
animator Guest
|
Posted: Thu Jan 20, 2005 2:21 am Post subject: Use MS XML Paser to format the XML string? |
|
|
There is a xml string in my TMemo. But the style is in disorder, and looks
bad.
How to use MSXMLPaser to check whether the string is a well-formed xml
document, and format it by well style, if necessary.
Like the code below. How can I write the two functions: isWellFormed and
formatToWell:
//code start
if isWellFormed( Memo1->Text )
Memo1->Text = formatToWell( Memo1->Text )
//code end
<!-- Then the string like -->
<?xml version="1.0"
encoding="GB2312"?><root><foo>test1</foo><bar>test2</bar></root>
<!-- will be change to -->
<?xml version="1.0" encoding="GB2312"?>
<root>
<foo>test1</foo>
<bar>test2</bar>
</root>
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|