|
-
December 30th, 2008, 05:12 AM
#1
More XmlDocument Help, attribute trouble!
Okay, so when I save a document with a blank attribute like this.
It comes out looking like this.
Is there any way to prevent this?
Last edited by code?; January 3rd, 2009 at 09:46 PM.
-
December 30th, 2008, 05:15 AM
#2
Re: More XmlDocument Help, save options?
I don't know if there is anyway to prevent it, but if the element is empty you could also use
-
December 30th, 2008, 05:19 AM
#3
Re: More XmlDocument Help, save options?
That's a negative, it won't work that way for the situation I'm in.
-
January 3rd, 2009, 09:47 PM
#4
Re: More XmlDocument Help, save options?
Nothing? Are you serious?
-
January 3rd, 2009, 10:25 PM
#5
Re: More XmlDocument Help, save options?
 Originally Posted by code?
That's a negative, it won't work that way for the situation I'm in.
First, that is an element, NOT an attribute.
Second, if your code does not work with all variations equally well, then you are not standards compliant.
With increasing processing happening to XML content at varying levels, we are seeing more and more variations in format. Providing data contains (or references) a valid schema, and conforms to that schema, NOTHING else should matter.
There are a number of "fuzzing" tools available (they make psuedo random changes to your data that do NOT impact the schema) to help test this aspect.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
January 3rd, 2009, 10:48 PM
#6
Re: More XmlDocument Help, save options?
Well, I seem to have found a solution. I set PreserveWhitespace to true (or false) and it made the document all one line.
It turns out, that the other program that reads the Xml, the file doesn't need to be fancy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|