Click here to Skip to main content
15,891,708 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i have an XML format and use c# and i assigned variable to each value in the xml tag for example if i have
<hello> i have a variable here in c# using xml XElement
so i can assign value to this variables and i get xml with this values.


My problem : now normal xml tags is working fine but when i want to appear something with " " or attribute lik ethat i cant do it :
XML
<Planaanvraag bron="PAKLIX" xmlns="http://www.gisvlaanderen.be/KLIP/Planaanvraag/1.0" 
              xmlns:xlink="http://www.w3.org/1999/xlink" 
              xmlns:gml="http://www.opengis.net/gml">


how can i make like tis format in c# using XElement ?

how can i get output like that XML format i want to add the bron="" , xmlns="link"

also this i cant do :
XML
<gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#31300">


how to add : and link like that ?
can any one help me

my example in c#
C#
new XElement("Plnaanvraag",
                new XElement("Bevestigings_URL", Planaanvraag_Bevestigings_URL),
                new XElement("Referentie_KLIP", Planaanvraag_Referentie_KLIP),
                new XElement("Tijdstip_Aanvraag", Planaanvraag_Tijdstip_Aanvraag)

i want this out put :
XML
<Planaanvraag bron="PAKLIX" xmlns="http://www.gisvlaanderen.be/KLIP/Planaanvraag/1.0" 
              xmlns:xlink="http://www.w3.org/1999/xlink" 
              xmlns:gml="http://www.opengis.net/gml">
  <Bevestigings_URL>http://klip.agiv.be/KLB/ConfirmPa.aspx?id=S3PQ2OYbwTiBokk2j8RO%2fA%3d%3d</Bevestigings_URL>
  <Referentie_KLIP>KLIP-PA-0001053816</Referentie_KLIP>
  <Tijdstip_Aanvraag>2015-01-22T10:34:11</Tijdstip_Aanvraag>


Planaanvraag_Bevestigings_URL ,Planaanvraag_Referentie_KLIP < just a c# variables
Posted
Updated 22-Feb-15 18:53pm
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900