Search

You searched for the word(s): userid:838347

Matching Posts

  • Re: How XML and XSLT retrieve aspx resx string?

    Well if you look at the documention of AddParam http://msdn.microsoft.com/en-us/library/system.xml.xsl.xsltargumentlist.addparam.aspx then you will see that the first argument is the parameter name, the second argument the namespace and the third argument the parameter value. Thus you rather need xslArg.AddParam("street1", "", Resources.string-ZH-CN); That should compile I think.
  • Re: Parsing XML-file

    Here is a LINQ to XML query in VB.NET that extracts the data. Then the sample code iterates over the extracted data, outputting it to the console. Obviously, instead of outputting to the Console you would insert the data into your data base: Dim doc As XDocument = XDocument.Load("input.xml") Dim query = _ From order In doc.<xmlimexport>.<orders>.<order> _ Select New With { _ .orderId = CType(order.<atOrder>.<ORDERID>(0), Integer), _ .to = CType(order.<atOrder>
  • Re: Read XML in reverse order

    Here is the stylesheet code again, hopefully this time as well-formed XML (if the forum does not mess it up again): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="count" select="10"/> <xsl:output indent="yes"/> <xsl:template match="updates"> <xsl:for-each select="update"> <xsl:sort select="position()" data-type="number" order
  • Re: Read XML in reverse order

    You can process nodes in reverse order by sorting in descending order on the position: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="count" select="10"/> <xsl:output indent="yes"/> <xsl:template match="updates"> <xsl:for-each select="update"> <xsl:sort select="position()" data-type="number" order="descending"/> <xsl
  • Re: Xml validation on form without xsd.

    Validation in the context of XML means validation against a DTD or against a schema or set of schemas. Asking to validate without having a schema or a DTD does not make sense. Checking for XML syntax errors is done by the XML parser so reading your XML in with XmlReader or XmlDocument or XPathDocument or XDocument will check for syntax errors.
  • Re: binding xmldatasource to dropdownlist

    The XMLDataSource exposes XML attributes as properties you can bind to. In your sample you do not have any attributes, instead you have elements. To solve that you can apply an XSLT stylesheet to transform leaf elements to attributes e.g. XSLTFile1.xslt is <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" > <xsl:output method="xml" indent
  • Re: copy node from one xml doc to another

    With .NET 3.5 you can use LINQ to XML as follows: XDocument doc1 = XDocument.Load("input1.xml"); XDocument doc2 = XDocument.Load("input2.xml"); doc2.Root.Element("Details").Element("Location").ReplaceWith(doc1.Root.Element("Details").Element("Location")); doc2.Save("result.xml"); With earlier versions you can use System.Xml.XmlDocument as follows:
  • Re: copy node from one xml doc to another

    Sorry, here is the code with XmlDocument: XmlDocument doc1 = new XmlDocument(); doc1.Load("input1.xml"); XmlDocument doc2 = new XmlDocument(); doc2.Load("input2.xml"); XmlNode loc2 = doc2.SelectSingleNode("config/Details/Location"); loc2.ParentNode.ReplaceChild(doc2.ImportNode(doc1.SelectSingleNode("config/Details/Location"), true), loc2); doc2.Save("result.xml");
  • Re: Arabic Data in XML File

    XML builds on and supports Unicode so you can use Arabic letters like other letters e.g. the following C#/.NET 3.5 code XDocument doc = new XDocument( new XElement("text", "هذه هي اللغة العربية.") ); doc.Save("file.xml"); creates the following XML document: <?xml version="1.0" encoding="utf-8"?> <text>هذه هي اللغة العربية.</text>
  • Re: What does xmlnode return when a node value doesn't exist.How can i test if value doens't exist

    Can you post a sample of the XML you have and explain in plain text which data you want to extract? Your code sample does not make it clear what you want to achieve.
Page 1 of 125 (1247 items) 1 2 3 4 5 Next > ... Last »