Dataset WriteXML

G

Guest

I am using the WriteXml method to generate an XML doc. The method adds the
xmlns = "http://mywebsiteaddress/myschema.xsd to my root element. I also
have an XSL with a for-each loop that transforms my XML into HTML. If I
manually delete the xmlns section from the XML' root element, the XSL works
and displays fine. With the xmlns section my XSL does not read any of the
data. Do I have to add anything to my XSL or can I disable WriteXml from
adding the xmlns. Thank you very much ahead of time.

Nick
 
C

Cor Ligthert

Nick,

A dataset is not real an XML document. It is a dataset that is serialized in
a XML file. Don't mix XML types of files. A dataset has by instance only
elements while a document uses attributes.

I hope this gives an idea.

Copr
 
G

Guest

Thanks good idea, but the default mode is already ignoreschema (otherwise it
puts much more info in the xml) and it still adds the xmlns: to my root
element. Thanks again.

Nick
 
G

Guest

Thanks Sahil,

Great Idea, but when I try I crash with "Cannot change the name of the
DataSet to an empty string" so I just tried to put any string and it still
wrote the original xsd. I think that method maybe used just for reading xml?
Thanks again.

Nick
 
G

Guest

Thanks for you help. I deleted the namespace references in my typed datased
and now it does not generate the xmlns.

Nick
 

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