Board index » cppbuilder » xml formatting problem

xml formatting problem


2005-11-05 06:24:25 AM
cppbuilder81
Help!
How do I get the xml to format correctly? Technically I know whitespace
isn't important but it's difficult to read the output when it's all mashed
together.
This is the code I've tried but with no affect:
IRS940DataSet = NewIRS940ReturnData();
IRS940DataSet->GetOwnerDocument()->Options << doNodeAutoIndent;
IRS940DataSet->GetOwnerDocument()->ParseOptions << poPreserveWhiteSpace;
IRS940DataSet->GetOwnerDocument()->NodeIndentStr = " ";
What I'm I doing wrong?
 
 

Re:xml formatting problem

"Isaac Church" < XXXX@XXXXX.COM >wrote in message
Quote
IRS940DataSet->GetOwnerDocument()->Options << doNodeAutoIndent;
IRS940DataSet->GetOwnerDocument()->ParseOptions << poPreserveWhiteSpace;
You cannot assign Set-based properties like that. You need to use the '='
operator as well, ie:
TXMLDocument *XMLDoc = IRS940DataSet->GetOwnerDocument();
XMLDoc->Options = XMLDoc->Options << doNodeAutoIndent;
XMLDoc->ParseOptions = XMLDoc->ParseOptions << poPreserveWhiteSpace;
//...
Gambit
 

Re:xml formatting problem

Quote
>IRS940DataSet->GetOwnerDocument()->Options << doNodeAutoIndent;
>IRS940DataSet->GetOwnerDocument()->ParseOptions << poPreserveWhiteSpace;

You cannot assign Set-based properties like that. You need to use the '='
operator as well, ie:

TXMLDocument *XMLDoc = IRS940DataSet->GetOwnerDocument();
XMLDoc->Options = XMLDoc->Options << doNodeAutoIndent;
XMLDoc->ParseOptions = XMLDoc->ParseOptions << poPreserveWhiteSpace;
//...


Gambit
Thank you! that did the trick...
 

{smallsort}