EDN Admin
Well-known member
<span style="font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:13px; color:#333333; line-height:16px
<p style=" Hi all,
<p style="
<p style=" Im having a problem with WriteStartElement and Namespaces.
<p style="
<p style=" I want my element to look like this:
<p style="
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial <<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial bem<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial :<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial InstrumentId <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial sourceCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial " value="DK0003210524<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial typeCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial Isin<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial IndexRatio<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial 1<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial />
[/code]
<p style="
<p style=" but when I use :
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial writer.WriteStartElement(elem.Prefix, elem.ParentName, <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial namespace);
[/code]
<p style="
<p style=" I get an element of format:
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial <<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial InstrumentId <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial sourceCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial " value="DK0003210524<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial typeCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial Isin<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial IndexRatio<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial 1<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial xmlns<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial bem<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial />
[/code]
<p style="
<p style=" How can I format my elment so that it appears as I want it? I have searched quite a bit on this and cannot find a solution. I have tried various things like having a "null" namespace but that causes errors.
<p style="
<p style=" Regards,
<p style=" Billy
View the full article
<p style=" Hi all,
<p style="
<p style=" Im having a problem with WriteStartElement and Namespaces.
<p style="
<p style=" I want my element to look like this:
<p style="
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial <<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial bem<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial :<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial InstrumentId <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial sourceCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial " value="DK0003210524<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial typeCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial Isin<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial IndexRatio<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial 1<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial />
[/code]
<p style="
<p style=" but when I use :
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial writer.WriteStartElement(elem.Prefix, elem.ParentName, <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial namespace);
[/code]
<p style="
<p style=" I get an element of format:
<p style="
<div style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; background-color:white; padding:0px; margin:0px; border:0px initial initial
<pre style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; list-style-type:none; text-decoration:none; word-wrap:break-word; text-align:left; padding:0px; margin:0px; border:0px none initial <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial <<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:#a31515; padding:0px; margin:0px; border:0px initial initial InstrumentId <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial sourceCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial " value="DK0003210524<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial typeCd<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial Isin<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial IndexRatio<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial 1<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:red; padding:0px; margin:0px; border:0px initial initial xmlns<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial =<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial "<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial bem<span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:black; padding:0px; margin:0px; border:0px initial initial " <span style="font-weight:inherit; font-style:inherit; font-family:inherit; outline-width:0px; outline-style:initial; outline-color:initial; color:blue; padding:0px; margin:0px; border:0px initial initial />
[/code]
<p style="
<p style=" How can I format my elment so that it appears as I want it? I have searched quite a bit on this and cannot find a solution. I have tried various things like having a "null" namespace but that causes errors.
<p style="
<p style=" Regards,
<p style=" Billy
View the full article