M
Markus Freitag
Guest
Hello,
XML via XDocument
<?xml version="1.0"?>
<active_conditions>
<condition id="12323" name="Sunny"/>
<condition id="13323" name="Warm"/>
</active_conditions>
I generate xml messages via XMLDocument. This goes so far, according to this schema.
But I get the answer back without CarriageReturn, LineFeed.
Some questions.
A) Is enough this way, without new objects
Right?
activeCondition.Add(
new XElement("condition",
new XAttribute("id", 12323),
new XAttribute("name", "Sunny")
),
new XElement("condition",
new XAttribute("id", 13323),
new XAttribute("name", "Warm")
)
);
B) Response from client
<SCADA><RESULT pass="true"/></SCADA>
Instead of using \r\n.
<SCADA>
<RESULT pass="true" />
</SCADA>
Can I generate the request without \r\n? If so, how?
Background: If the messages are large I save bytes, cycle time.
Do I have to consider something when parsing if it is sent with or without \r\n
What corresponds more to the XML specification? ...can I look it up (internet link)?
Greetings Markus
Continue reading...
XML via XDocument
<?xml version="1.0"?>
<active_conditions>
<condition id="12323" name="Sunny"/>
<condition id="13323" name="Warm"/>
</active_conditions>
I generate xml messages via XMLDocument. This goes so far, according to this schema.
But I get the answer back without CarriageReturn, LineFeed.
Some questions.
A) Is enough this way, without new objects
Right?
activeCondition.Add(
new XElement("condition",
new XAttribute("id", 12323),
new XAttribute("name", "Sunny")
),
new XElement("condition",
new XAttribute("id", 13323),
new XAttribute("name", "Warm")
)
);
B) Response from client
<SCADA><RESULT pass="true"/></SCADA>
Instead of using \r\n.
<SCADA>
<RESULT pass="true" />
</SCADA>
Can I generate the request without \r\n? If so, how?
Background: If the messages are large I save bytes, cycle time.
Do I have to consider something when parsing if it is sent with or without \r\n
What corresponds more to the XML specification? ...can I look it up (internet link)?
Greetings Markus
Continue reading...