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.
I am using XmlElements and AppendChild to create an XML tree. Now, the first level from the root writes on a new line but all other XmlElements write on the same line. How do I get each new XmlElement to write on a new line with proper indentation?
XNamespace ns = "should probably be the XSD namespace";
XElement documentation = new XElement(ns + "documentation");
XElement annotation = new XElement(ns + "annotation");
XElement eventStatus = new XElement(ns + "element");
XElement root = new XElement("root", new XAttribute(XNamespace.Xmlns + "xsd", ns));
string s = root.ToString(); // Just a debug test line
I have already gone through MSDN and multiple good known resources.
but I don't have time to elaborate and go deep in it.
I just want to give me best practices library for deeply working on xslt, XML resolver, and class library where I can implement my actual business logics using c#.Net and TPL.
I am trying to transform an XML file through code using XSL, but for some reason, the file output is displaying the entire XML as a string at the top of the document and then, just under the XML string, the document is parsed correctly by the XSL stylesheet. I would like to learn why this is happening. Here is the VB transform code:
Dim ds As New DataSet
ds.ReadXml(Server.MapPath("FormResults/" & FormID.ToString() & ".xml"))
Dim DocXSL As New XslCompiledTransform
Dim sw As New StringWriter()
Dim DocXML As New XmlDocument
'The GetXSLContent function returns the XLS template to be used
DocXSL.Transform(DocXML, Nothing, sw)
Dim result As String = sw.ToString()
sw = Nothing
Me.My_Literal.Text = result.ToString()
Private Function GetXSLContent(ByVal DFLID As Integer) As String
Dim str As String = String.Empty
str = Server.MapPath("FormLetters/" & DFLID.ToString() & "_DataTemplate.xslt")
Here is the XML
<?xmlversion="1.0"encoding="utf-8"standalone="yes"?><Results><FieldsID="48"><Department>I.T.</Department><Extension>2267</Extension><Location>Primary Office Bldg</Location><Name_of_User>David</Name_of_User><Date>9/12/2014</Date><Time>04:49</Time><Details1>This is a test. asdf sasdf sa</Details1><Details2>This is only a test.</Details2><Details3>This is a test.</Details3><Details4>This is only a test.</Details4><Details5>This is a test.</Details5><Details6>This is only a test.</Details6><Details7>This is a test.</Details7><Details8>This is only a test.</Details8></Fields></Results>
Here's the output:
I.T. 2267 Gov. Center Vickie 9/12/2014 04:49 This is a test. asdf sasdf sa This is only a test. This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test.
User Name: David
Location: Primary Office Bldg
Date & Time: 9/12/2014 04:49
Details: This is a test. asdf sasdf sa
This is only a test.
This is a test.
This is only a test.
This is a test.
iam sorry i did not explain very well.
it is not the actual link...
i mean i want to store my update.xml file somewhere on the remote location and access its link as something link www.website.com/update.xml and not as www.googledrive.com/id?=xskdhfIsksdhf
it is because i want to compare the two files update.xml in the local drives, and the www.website.com/update.xml from from remote location.