BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Use MS XML Paser to format the XML string?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
animator
Guest





PostPosted: Thu Jan 20, 2005 2:21 am    Post subject: Use MS XML Paser to format the XML string? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.