[Trilinos-Users] Teuchos::XMLObject contents
Pavel Jiránek
pavel.jiranek at gmail.com
Mon Sep 9 09:25:04 MDT 2013
Hello,
I'm working on an XML file format in my code and I would like to specify a
text within an XML tag like
<text>
some text
more text
</text>
I would like to read the contents line by line and I thought to use the
XMLObject's numContentLines() and getContentLine() methods. However, when I
make a loop over the lines and print them to the output, I get the contents
of the tag character by character, i.e., something like this:
' ' ' ' ' ' ... ' ' 's' 'o' 'm' 'e' ' ' 't' 'e' 'x' 't' ... etc
with the code like this:
for (int i = 0; i < xml.numContentLines(); ++i) std::cout << "'" <<
xml.getContentLine(i) << "'";
Is this the intended behavior or am I doing something wrong? Of course I
would like to get the two lines. I'm using the repository version of
Trilinos.
Thanks in advance for any feedback.
Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130909/3c6482e9/attachment.html
More information about the Trilinos-Users
mailing list