xsf and white spaces

E

esebastian

hello everyone,
I have kind of a wierd problem. I created a utility that will allow
the user to make an update inside the manifest.xsf file, the user
selects an xsn file, the program unpackages it, makes the change to
the manifest.xsf file and repackages the contents back to an xsn file.
Here is my problem.
I try and open the xsn file and i get errors because there are now
white spaces that the DTD file is complaining about. So if a child
node within the xsf originally looks like:

<ChildNode attribute="1"></ChildNode>

it nows looks like

<ChildNode attribute="1"> </ChildNode>

and it complains because the schema doesn't recognize the format.

how on earth can i prevent those white spaces being added to the xml??
here is the code i use to open the xsf, make changes and then save it
back.

xDoc.Load(path + MANIFEST_FILE);
XmlNodeList nodeList = xDoc.GetElementsByTagName("xsf:adoAdapter");

for (int i = 0; i < nodeList.Count; i++)
{
nodeList.Attributes.GetNamedItem("connectionString").InnerText =
this.txtConnectionString.Text;
}

xDoc.Save(path + MANIFEST_FILE);

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top