Skip to content

XML / XSL

Discussions on XML and related technologies

This category can be followed from the open social web via the handle xml-xsl@forum.codeproject.com

2.6k Topics 6.8k Posts
  • 0 Votes
    2 Posts
    0 Views
    S
    Ummm - there are various ways of inidicating the schema in use - usually use of different namespaces, on eper schema. The namespace declaration attribute is generally on the root node of the document. Alternatively, there is a specific namespace and set of attributes[^] that can be used to show what schema is in use. Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p CodeProject MVP for 2010 - who'd'a thunk it!
  • SOAP C# Tutorial/Example

    tutorial help csharp wcf sysadmin
    3
    0 Votes
    3 Posts
    0 Views
    F
    Thanks Sebastian for the time: Below is a snippet of the code that creates and calls the service (simply). Below the code is the sniffer section that shows that there is no SOAP-ENV namespace. So I guess my guestion is, how can I create a user specified SOAP message. O    int rprocess;                   int rErrors;                   int sampAdded;                   int sampMod;                   int sampDeleted;                   int aliAdded;                   int aliModified;                   int aliDeleted;                   int[] recSent = {'1'};                   string[] reqNum = {"C0772014121"};                   string[] sampType = {"BLOOD"};                   string[] sampID = {"07720141210"};                   DateTime[] inputDate = {Convert.ToDateTime("2009-10-15")};                   DateTime[] inputTime = {Convert.ToDateTime("17:12")};                   int[] aliID = {100050};                                     WebReference.Freezerworks service = new WebReference.Freezerworks();                   service.Url = @"http://172.32.2.102:8081/Freezerworks/Update/";                   try                   {                         service.TestUpdate("ffowler",
  • Getting zero elements with xmldocument.selectnodes

    javascript xml html css database
    2
    0 Votes
    2 Posts
    0 Views
    D
    you need to consider namespace when dealing with this XML. check out this link for a better explanation: http://weblogs.asp.net/wallen/archive/2003/04/02/4725.aspx
  • Tools for merging multiple xsd files

    xml database tools help question
    6
    0 Votes
    6 Posts
    0 Views
    C
    It's extremely unfortunate. Obviously, there is severe lack of such a wonderful tool :-( I wish XML Spy could provide this kind of feature ...
  • add element unique Id XSLT

    database xml
    2
    0 Votes
    2 Posts
    1 Views
    M
    I have got the answer from daniweb (thanks fpmurphy) : <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="\*"> <xsl:variable name="name" select="name()" /> <xsl:element name="{name()}"> <xsl:attribute name="id"> <xsl:value-of select="count(preceding::\*\[name()=$name\]) + 1" /> </xsl:attribute> <xsl:apply-templates /> </xsl:element> </xsl:template> </xsl:stylesheet>
  • XML file compression

    performance question css sysadmin xml
    3
    0 Votes
    3 Posts
    0 Views
    D
    we can zip compressed file.
  • Using unparsed entities in schemas

    xml database help tutorial question
    9
    0 Votes
    9 Posts
    0 Views
    R
    Hi! Unfortunly, our long and winding road is continuing. The Ms .NET XML parser is not finished too. After passing Your successfull example, I tried to pass example of using unparsed entity. I added some entity and it notation in the DTD and some attribute definition of the ENTITY type in the schema. After I added this attribute with the unparsed entity value and executed Your program. The test was ok. But after I assigned to the attribute improper value (not unparsed entity) and test was once again ok! After my tests I have a mind that the parser checks attributes of the ENTITY type as of the the NCName type (the direct ancestor of the ENTITY type). The XML file and schema is here: Changes.xml <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE change-history [ <!ENTITY eacute "é"> <!NOTATION MyNotation SYSTEM "My Notation"> <!ENTITY MyEntity SYSTEM "My Entity" NDATA MyNotation> ]> <change-history product="Sample" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="change-history.xsd">    <items>          <item name="Sample.exe">             <version number="2.21.0" entity = "MyEntity">                   <change reason="issue 11">Added license to executable.</change>                   <change>éFixed bug in executable.</change>             </version>          </item>    </items> </change-history> change-history.xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">    <xs:element name="change-history">       xs:annotation          xs:documentationComment describing your root element</xs:documentation>       </xs:annotation>       xs:complexType          xs:sequence             <xs:element name="items">                xs:complexType
  • I need an ebay program

    php com help
    4
    0 Votes
    4 Posts
    2 Views
    T
    Maybe he is hoping for a prize. I count 12 cross posts. "GOLD award - for the most cross-posts on a single subject" If you have knowledge, let others light their candles at it. Margaret Fuller (1810 - 1850) [My Articles]  [My Website] modified on Thursday, January 14, 2010 1:03 PM
  • XQuery

    question tools help announcement
    4
    0 Votes
    4 Posts
    0 Views
    L
    See my post below. That was a pure syntax error. Greetings - Jacek
  • XML With C#

    csharp xml tutorial
    2
    0 Votes
    2 Posts
    0 Views
    V
    class Program { class Sample { public Sample() { string xmlString = "<xml><item>a<!--Item A--></item><item>b<!--Item B--></item><item>b<!--Item C--></item></xml>"; XmlDocument document = new XmlDocument(); document.LoadXml(xmlString); //Navigate throgh all the nodes and check if a node is a comment Console.WriteLine("Method 1"); XmlNodeList nodes = document.SelectNodes("xml/item"); foreach (XmlNode childnode in nodes) { if (childnode.LastChild.NodeType == XmlNodeType.Comment) { Console.WriteLine(childnode.LastChild.InnerText); } } //Using Exact XQuery Console.WriteLine("\\n\\nMethod 2"); nodes = document.SelectNodes("xml/item/comment()"); foreach (XmlNode childnode in nodes) { Console.WriteLine(childnode.InnerText); } } } static void Main(string\[\] args) { Sample sample = new Sample(); Console.ReadLine(); } } Hope it helps!
  • XML opening with IE

    help xml question
    2
    0 Votes
    2 Posts
    4 Views
    V
    Do you have Zone Alarm installed? Check this out. Hope it solves. http://www.pcreview.co.uk/forums/thread-106850.php[^]
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • Generate Dynamic controls using XSLT

    xml tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    N
    Start here[^] I know the language. I've read a book. - _Madmatt
  • Help with xml within dll file

    help graphics hardware xml
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • Missunderstanding schema namespaces

    xml database question
    2
    0 Votes
    2 Posts
    1 Views
    D
    1. xmlns xmlns is described here: http://www.w3schools.com/XML/xml_namespaces.asp[^] We can read there: When using prefixes in XML, a so-called namespace for the prefix must be defined. And the example: <h:table xmlns:h="http://www.w3.org/TR/html4/"> The xmlns defines what h prefix means. It must be in the XML document. 2. targetNamespace You can read about it here: http://www.w3schools.com/schema/el_schema.asp[^] It's used in XML schemas. We can read there: targetNamespace - Optional. A URI reference of the namespace of this schema That's the defference between them. PS. In the XML schamas there's a line: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> By this xmlns, you define what xs prefix means, so this means that you shouldn't change it.
  • 0 Votes
    3 Posts
    0 Views
    V
    Hi Greth, Try it. <html> <head> <script type="text/javascript"> var xmlDoc; if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest(); }else // Internet Explorer 5/6 { xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET","Cat2.xml",false); xhttp.send(""); xmlDoc=xhttp.responseXML; var x=xmlDoc.getElementsByTagName("FMPDSORESULT"); function display() { if(xhttp.readyState==4 && xhttp.status == 200) { var xmlDoc=xhttp.responseXML; var x=xmlDoc.documentElement.getElementsByTagName("FMPDSORESULT"); try { var _txt="<table border='0'>"; var x=xmlDoc.documentElement.getElementsByTagName("ROW"); for (i=0;i<x.length;i++) { _txt+="<tr><td>"; _txt+="<a href="; try{_txt+=x[i].getElementsByTagName("IMG")[0].childNodes[0].nodeValue;}catch(exp0){}; _txt+=">"; _txt+="<img src="; try{_txt+=x[i].getElementsByTagName("THUMB")[0].childNodes[0].nodeValue;}catch(exp0){}; _txt+="/></a>"; _txt+="</td><td>"; try{_txt+=x[i].getElementsByTagName("DESCRNL")[0].childNodes[0].nodeValue;}catch(exp0){}; _txt+="</td><td>"; try{_txt+=x[i].getElementsByTagName("DESCRFR")[0].childNodes[0].nodeValue;}catch(exp0){}; _txt+="</td></tr>"; }_txt+="</table>"; document.getElementById('_DIV').innerHTML=_txt; }catch(exp){alert(exp.message);} } } </script> </head> <body> <button onclick="display()">VINDICATION</button> <div id="_DIV"></div> </body> </html>
  • XSL +query string value

    xml html database question
    2
    0 Votes
    2 Posts
    1 Views
    B
    Have a look Cheers!! Brij
  • 2 xml used from the same hmtl page

    xml help question announcement
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • XPATH problem

    xml help com question
    2
    0 Votes
    2 Posts
    0 Views
    S
    This XPath will get you the name of the first contributor: //Person[Email=//Contributor[1]/Email]/Name I don't think you can get all the names in one go with XPath. Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
  • Create HTML with XML including Images and XSL

    xml html hardware
    2
    0 Votes
    2 Posts
    0 Views
    B
    You can use xsl to render your xml in html format very easily. I didn't understand what do you mean by embedded images.I think xml file would e conaining some relative path of the images and images are in a specified folder on a specific location. Cheers!! Brij