XML prefix doesn't show up when no defined URI in ASP.Net -


basically trying generate xml following format:

<m:messageheader>   <m:date>2017-09-14></m:date>   <m:source>web</m:source> </m:messageheader> 

below code:

dim msgheader xmlnode  msgheader = xml.createelement("m", "messageheader", "") 

however, prefix 'm' doesn't appear in messsageheader. below output of above code:

<messageheader /> 

what should expected output?

because must specify namespaceuri.

if leave namespaceuri parameter empty or null, prefix omitted.

try:

msgheader = xml.createelement("m", "messageheader", "https://stackoverflow.com/") 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -