[xml] xmlDocDumpMemory and xmlParseMemory

Date view Thread view Subject view Author view

From: Matthew Kellett (matthewk@rebel.com)
Date: Wed Nov 08 2000 - 11:03:12 EST


Hi,

I've run into an inconsistency between xmlDocDumpMemory and xmlParseMemory
and I'm wondering if there's another way of doing what I want to do.

I create a tree structure and then save it to memory using
xmlDocDumpMemory. I then parse it using xmlParseMemory. xmlDocDumpMemory
seems to add carriage returns '\n' for visual formatting. xmlParseMemory
interprets these carriage returns as content and create text nodes in the
new tree with the carriage returns.

I've thought of two workarounds for this. One is to ignore these text
nodes in the parsed tree. Unfortunately, this adds a level of complexity
to my code. The other is remove carriage returns from the dumped memory
block. Unfortunately, this could mean removing significant carriage
returns, like those in text blocks.

Is this expected behaviour? Is there a workaround that won't affect
significant carriage returns? Are these the right functions to use for
doing this or am I missing something? Any help would be appreciated.

Cheers,
Matthew

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Nov 08 2000 - 11:46:28 EST