如何使用c#以xml格式添加链接和双引号 [英] How to add links and double quotations in xml format using c#
问题描述
您好我有XML格式并使用c#和i为xml标记中的每个值分配变量,例如,如果我有
< hello>我在c#中有一个变量,使用xml XElement
所以我可以为这个变量赋值,我得到这个值的xml。
我的问题:现在正常的xml标签工作正常,但是当我想出现带有或属性的东西时,我不能这样做:
< Planaanvraag bron = PAKLIX xmlns = http://www.gisvlaanderen.be/KLIP/Planaanvraag/1.0\"
xmlns:xlink = http ://www.w3.org/1999/xlink
< span class =code-attribute>
< span class =code-attribute> xmlns:gml = http://www.opengis.net/gml >
如何使用XElement在c#中制作tis格式?
我怎样才能得到类似XML格式的输出我想添加bron =,xmlns =link
这也是我无法做到的:< pre lang =xml> < gml:Polygon srsName = http:// www .opengis.net / gml / srs / epsg.xml#31300 >
如何添加:和l这样的墨水?
可以任何人帮助我
我的例子在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想要这个输出:
< Planaanvraag bron = PAKLIX xmlns = http:// www .gisvlaanderen.be / KLIP / Planaanvraag / 1.0
< span class =code-attribute> 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 >
< span class =code-keyword>< Tijdstip_Aanvraag > 2015-01- 22T10:34:11 < / Tijdstip_Aanvraag >
Planaanvraag_Bevestigings_URL,Planaanvraag_Referentie_KLIP<只需ac#variables
在你的xml中使用例如 http://streamshare.streamserve.com/Forum/Topic/?topicID=1472 [ ^ ]。
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 :
<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 :
<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#
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 :
<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
Use " in you xml for e.g. http://streamshare.streamserve.com/Forum/Topic/?topicID=1472[^].
这篇关于如何使用c#以xml格式添加链接和双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!