From: Kenneth Pronovici (pronovic@skyjammer.com)
Date: Mon Sep 11 2000 - 12:07:36 EDT
> You can switch it on using:
> int xmlIndentTreeOutput;
Along the lines of this post, I've found something that does not quite
seem to work with indenting. Take this code fragment:
comment = xmlNewComment((xmlChar *)"Program configuration section.");
element = xmlAddChild(program, comment);
element = xmlNewChild(program, NULL, (xmlChar *)"statistics_enabled",
(xmlChar *)"N");
element = xmlNewChild(program, NULL, (xmlChar *)"statistics_filepath",
(xmlChar *)"stats.txt");
element = xmlNewChild(program, NULL, (xmlChar *)"working_directory",
(xmlChar *)"/dvl/fds/tmp");
element = xmlNewChild(program, NULL, (xmlChar *)"dtd_path",
(xmlChar *)"/dvl/fds/dtd");
element = xmlNewChild(program, NULL, (xmlChar *)"generate_cooked",
(xmlChar *)"Y");
With indenting turned on, I get this in my document:
<program>
<!--Program configuration section.-->
<statistics_enabled>N</statistics_enabled>
<statistics_filepath>stats.txt</statistics_filepath>
<working_directory>/dvl/fds/tmp</working_directory>
<dtd_path>/dvl/fds/dtd</dtd_path>
<generate_cooked>Y</generate_cooked>
</program>
In other words, the comments don't seem to follow the indentation
rules. I know comments aren't "significant", but I expected that
comments belonging to the parent node would be at the same level
as the rest of the elements belonging to the parent node.
Thanks for the info...
KEN
-- Kenneth J. Pronovici <pronovic@ieee.org> Alliance of Computer Professionals (http://www.acpros.com/) Personal Homepage: http://www.skyjammer.com/~pronovic/ "Hell hath no fury like the weather when I'm camping..."---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Mon Sep 11 2000 - 12:43:22 EDT