For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
So, I've created form with button to generate the xml files and I created this code for That:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim xmlsetting As New XmlWriterSettings 'xmlsetting.ConformanceLevel = ConformanceLevel.Document 'xmlsetting.OmitXmlDeclaration = True Dim writxml As XmlWriter = XmlWriter.Create("mytest.xml", xmlsetting) Try With writxml .WriteStartDocument() .WriteStartElement("DeclarationReleveDeduction") .WriteStartElement("identifiantFiscal") .WriteString("111111") .WriteEndElement() .WriteStartElement("annee") .WriteString("2016") .WriteEndElement() .WriteStartElement("periode") .WriteString("8") .WriteEndElement() .WriteStartElement("regime") .WriteString("1") .WriteEndElement() .WriteStartElement("Relvededution") For i As Integer = 1 To 10 .WriteStartElement("Id") .WriteString(i) .WriteStartElement("Nom") .WriteString("Nom " & i) .WriteEndElement() .WriteStartElement("prenom") .WriteString("Prenom " & i) .WriteEndElement() .WriteStartElement("Adresse") .WriteString("Adresse " & i) .WriteEndElement() .WriteEndElement() Next
.WriteEndElement() .WriteEndElement() .WriteEndDocument() .Close() End With MsgBox("fichier a été généré avec succès", vbInformation) Catch ex As Exception MsgBox(ex.Message) End Try End Sub when I generated the xml file I have got like this format:
Help me read value in note <Code>, <Message>, <Time>
string result = "<?xml version="1.0" encoding="utf-8"?><stringxmlns="http://tempuri.org/"><AAA><Code>5</Code><Message>Send MT Error!.</Message><Time></Time></AAA></string>"
XmlReader xReader = XmlReader.Create(new StringReader(result));
Thanks so much!
I am getting this message when I try to validate my xml document: 13:2 The markup in the document following the root element must be well-formed. Every time when I try to fix line 13, I get the same error message.
<?xmlversion="1.0"?><registration_form><name>Digestive and Endoscopy Medical Office MD</name><register>patient information</register><patient>Arijit Singh</patient><status>Single</status><birthdate>10/20/1987</birthdate><age>27</age><address>6216 GreatWater Dr, Windermer, FL 34786</address><home>(407)-987-2525</home><cell>(407)-288-9331</cell></registration_form><patientemployment><employer<information>Orlando Home Team</employer><occupation>Real Estate Agent</occupation><address>1300 e Michigan St, Orlando, FL 32812</address><employer>(407)-885-3539</employer><patientemployment><Insurance_Information><subscriber>Arijit Singh</subscriber><subscriber'sS.S.>789-53-3407</subscriber'sS.S.><group>DC2630</group><co-payment>$50</co-payment></Insurance_Information><InCaseofEmergency><name>Zina Kaur</name><relationship>fiancee</relationship><authorization>Arijit Singh</authorization></InCaseofEmergency>
To this point I do not know what I am doing wrong. could you just please point out what I am doing wrong and how to fix it. I have been working on this for three days and I still could not figure it out.