If I understand you correctly, what I described is not in fact exactly what you do. It sounds like rather than the invalid serialization that I asked about, your document is being serialized correctly.
Invalid: <editnumber formula="<data>.//activity/@status</data>"/> Valid: <editnumber formula="<data>.//activity/@status</data>"/> If this is true, the problem is in the parsing as you suggest. I think a test case is needed. I'd recommend attaching an example of a problematic document that cannot be processed by one of the sample applications (like DOMParse). -----Original Message----- From: Leif Goodwin [mailto:[email protected]] Sent: Wednesday, November 18, 2009 5:31 AM To: [email protected] Subject: RE: How to have an attribute which contains XML Yes, that is exactly what we do. I use the setAttribute method on DOMElement instance passing name as "formula" and value as "<data>.//activity/@status</data>". Then I serialise the DOMDocument to a string. When I examine the string, I see that Xerces has replaced each '<' with "<" which is correct. But it leaves each '>' as is. Then when I try to serialise the string into a DOM document, the result is nonsense, as I think the '>' characters are interpreted as close element markers. I tried replacing each '>' with ">" in the string before passing it to setAttribute, but that did not work, as it replces the '&' with "&". --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
