Jump to content

Search the Community

Showing results for tags 'xml'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 173 results

  1. xml into xslt

    I want to change my xml file into xsl so that it can fit into my chart, I am trying to put it into ascending form… This is my .xml<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="banks.xsl"?> <chart caption='Banks' xAxisName='Bank Types' yAxisName='Amount' numberPrefix='$' showValues='0'> <set label='UOB' value='420000' /> <set label='UOB' value='910000' /> <set label='DBS' value='720000' /> <set label='OCBC' value='550000' /> <set label='UOB' value='810000' /> <set label='DBS' value='510000' /> <set label='OCBC' value='680000' /> <set label='UOB' value='620000' /> <set label='DBS' value='610000' /> <set label='OCBC' value='490000' /> <set label='OCBC' value='530000' /> <set label='DBS' value='330000' /> <styles> <definition> <style name='CanvasAnim' type='animation' param='_xScale' start= '0' duration='1' /> </definition> <application> <apply toObject='Canvas' styles='CanvasAnim' /> </application> </styles> </chart> And this is my .xsl file <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="chart"> <xsl:apply-templates select="label"> <xsl:sort order="ascending" /> </xsl:apply-templates> </xsl:template> </xsl:stylesheet> I had another try: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output indent="yes"/><xsl:strip-space elements="*"/><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"><xsl:sort select="@value"/></xsl:apply-templates></xsl:copy></xsl:template></xsl:stylesheet> But both cannot work... please help me... Thank you!!!
  2. Dele me!: document fragment

    There isn't any clear(known) example of this: <?xml version="1.0" encoding="UTF-8"?><!-- Edited by XMLSpy -->-<bookstore>is this a document fragment?-<book category="cooking"><title lang="en">Everyday Italian</title><author>Giada De Laurentiis</author><year>2005</year><price>30.00</price></book>And can extract this fragment?-<book category="children"><title lang="en">Harry Potter</title><author>J K. Rowling</author><year>2005</year><price>29.99</price></book>-<book category="web"><title lang="en">XQuery Kick Start</title><author>James McGovern</author><author>Per Bothner</author><author>Kurt Cagle</author><author>James Linn</author><author>Vaidyanathan Nagarajan</author><year>2003</year><price>49.99</price></book>-<book category="web" cover="paperback"><title lang="en">Learning XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price></book></bookstore>
  3. The previous button of carousel,a slider appearing below menu containing links like Home,All Posts etc. is not working correct on this blog.It is appearing in the following way:- I have highlighted the button which is having problem, it should appear in the following way:- Can anybody help me,it is spoiling the look of my blog,
  4. With the previous template of my blog,I created various pages with the font Sniglet.And now after changing the template,main font of my blog is Oswald.So is there anyway in javascript,css,html5 or in xml through which I can add a piece of code in the homepage of my blog and all the Sniglet fonts would get replaced with oswald
  5. Background of text not appearing

    There's a carousel at the top of this blog,a kind of slider just below the menu containing text like Home,Suggestions etc. and there is text background added on the text appearing over the images it appears behind the text but not the way I want.I want it to appear in the following way,how to do it.
  6. Bullets Not Appearing

    In my this post-->http://technopcarea.blogspot.com/2014/06/how-to-make-your-websites-design.html or others like it,in steps to add the widget the bullets are not appearing,at the place of <li> tag disc's should appear but nothing is appearing,why ?
  7. hello dear all new to this forums and also new to php. so do not bear with me.well i am not too familiar with PHP. We just should run a few more xpath queries inside the loop for all the address keys and the website. we need to do this here <?php/** * OSM Overpass API with PHP SimpleXML / XPath * * PHP Version: 5.4 - Can be back-ported to 5.3 by using 5.3 Array-Syntax (not PHP 5.4's square brackets) *///// 1.) Query an OSM Overpass API Endpoint//$query = 'node ["amenity"~".*"] (38.415938460513274,16.06338500976562,39.52205163048525,17.51220703125);out;';$context = stream_context_create(['http' => [ 'method' => 'POST', 'header' => ['Content-Type: application/x-www-form-urlencoded'], 'content' => 'data=' . urlencode($query),]]);# please do not stress this service, this example is for demonstration purposes only.$endpoint = 'http://overpass-api.de/api/interpreter';libxml_set_streams_context($context);$start = microtime(true);$result = simplexml_load_file($endpoint);printf("Query returned %2$d node(s) and took %1$.5f seconds.nn", microtime(true) - $start, count($result->node));//// 2.) Work with the XML Result//# get all school nodes with xpath$xpath = '//node[tag[@k = "amenity" and @v = "school"]]';$schools = $result->xpath($xpath);printf("%d School(s) found:n", count($schools));foreach ($schools as $index => $school){ # Get the name of the school (if any), again with xpath list($name) = $school->xpath('tag[@k = "name"]/@v') + ['(unnamed)']; printf("#%02d: ID:%' -10s [%s,%s] %sn", $index, $school['id'], $school['lat'], $school['lon'], $name);}?> i just have had a quick view on the above mentioned site. i try to figure out how to do this - for any and all hints i am thankful The following code lists all schools and tries to obtain their names as well. I have not covered translations yet because my sample data didn't have those, but you can also look for all kind of names including translations and just prefer a specific one): //// 2.) Work with the XML Result//# get all school nodes with xpath$xpath = '//node[tag[@k = "amenity" and @v = "school"]]';$schools = $result->xpath($xpath);printf("%d School(s) found:n", count($schools));foreach ($schools as $index => $school){ # Get the name of the school (if any), again with xpath list($name) = $school->xpath('tag[@k = "name"]/@v') + ['(unnamed)']; printf("#%02d: ID:%' -10s [%s,%s] %sn", $index, $school['id'], $school['lat'], $school['lon'], $name);} The key point here are the xpath queries.In the above mentioend example two are used, the first xpath queriy is to get the nodes that have certain tags.I think this is the most interesting one for me: //node[tag[@k = "amenity" and @v = "school"]] This line says: Give us all node elements that have a tag element inside which has the k attribute value "amenity" and the v attribute value "school". This is the condition we have to filter out those nodes that are tagged with amenity school.Further on xpath is used again, now relative to those school nodes to see if there is a name and if so to fetch it: tag[@k = "name"]/@v' This line says: Relative to the current node, give me the v attribute from a tag element that as the k attribute value "name". As you can see, some parts are again similar to the line before. I think you can both adopt them to your needs.Because not all school nodes have a name, a default string is provided for display purposes by adding it to the (then empty) result array: list($name) = $school->xpath('tag[@k = "name"]/@v') + ['(unnamed)']; ^^^^^^^^^^^^^^^ Provide Default Value So here my results for that code-example: and now i try to figure out how i can enter more xpath queries at the above mentioned codeand get out even more important data - see here Key:contact - OpenStreetMap Wiki i will digg into all documents and come back later the weekend... and report all the findingswell - i think that i need to extend the xpath requests within the loop where xpath is used again,now relative to those school nodes to see if there is a name and if so to fetch it: tag[@k = "name"]/@v'tag[@k = " contact:website"]/@v'tag[@k = " contact:email"]/@v' What do you say...?many many thanks to you for all your help. You are very supportive. Keep up the superb work here....
  8. i hove store url of pic in xml i wan to get them and display in html i have been use Xpath language and XSLT but i don't display this pic. who can help me? thanks for help full follow is content of file xml(name hanghoa.xml) and file xslt(name hanghoa.xslt) <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xml" href="hanghoa.xslt"?> <KimLan> <HangHoa> <TenHang>Thuoc la Thang Long</TenHang> <HinhAnh><img src="pics/thuoclathanglong.jpg"/></HinhAnh>(i try to replace that)<HinhAnh>"pics/thuoclathanglong.jpg"</HinhAnh> <Gia>8.000 VND</Gia> <GhiChu>Một cây: 100.000 VND</GhiChu> </HangHoa> </KimLan> <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/"> <html> <head> <title>Tap Hoa Kim Lan</title> <link href="css/common.css" rel="stylesheet" type="text/css"/> </head> <body> <div class="header"></div> <div class="content"> <xsl:for-each select="/KimLan/HangHoa"> <xsl:variable name="url" select="HinhAnh"/> <div class="hanghoa"> <xsl:value-of select="$url"/> ( i try to replace that with)<img src="<xsl:value-of select="$url"/>"/> <div class="detail"> <p><xsl:value-of select="TenHang"/></p> <p><xsl:value-of select="Gia"/></p> <p><xsl:value-of select="GhiChu"/></p> </div> </div> </xsl:for-each> <div class="clr"></div> </div> <div class="footer"> <p> Website is create by Nguyen Van Tuyen </p> </div> </body> </html> </xsl:template> </xsl:stylesheet>
  9. Used Wsdl with php and xml file

    Hello everyone, I have my wsdl file and a php page with Soap and I would use the XML files, but I'm a bit lost with namespace and schemaLocation when I call the xml file it appears empty, i just take the some line to show the namespace and Schemaslocation. wsdl: <?xml version="1.0" encoding="UTF-8"?><definitions xmlns:typens="urn:b2bHotelSOAP" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="b2bHotelSOAP" targetNamespace="urn:b2bHotelSOAP"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:b2bHotelSOAP"> <!--<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>--> <complexType name="roomArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:paxesArray[]"/> </restriction> </complexContent> </complexType> <complexType name="paxesArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:pax[]"/> </restriction> </complexContent> XML : <?xml version="1.0" encoding="UTF-8" ?> - <XMLResponse schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:b2bHotelSOAP" > <ResponseType>HotelListResponse</ResponseType> - <RequestInfo> <AffiliateCode>XX0000</AffiliateCode> <AffRequestId>XXX</AffRequestId> <AffRequestTime>yyyy-mm-ddThh:mm:ss</AffRequestTime> </RequestInfo> <TotalNumber>XXXXX</TotalNumber> - <Hotels> Thank you !
  10. hi friend i am used the java script to display the currency of Iraqi dinars from this xml file http://www.xe.com/datafeed/samples/sample-xml-usd.xml and i used this code <script>if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }xmlhttp.open("GET","http://www.xe.com/datafeed/samples/sample-xml-usd.xml",false);xmlhttp.send();xmlDoc=xmlhttp.responseXML; currency=xmlDoc.getElementsByTagName("crate")[65].childNodes[0].nodeValue;document.write(currency);</script> but that is not work and i don't know why? please tell me what is my mistakes ... help me
  11. xml into xslt

    I want to change my xml file into xsl so that it can fit into my chart, I am trying to put it into ascending form… This is my .xml<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="banks.xsl"?> <chart caption='Banks' xAxisName='Bank Types' yAxisName='Amount' numberPrefix='$' showValues='0'> <set label='UOB' value='420000' /> <set label='UOB' value='910000' /> <set label='DBS' value='720000' /> <set label='OCBC' value='550000' /> <set label='UOB' value='810000' /> <set label='DBS' value='510000' /> <set label='OCBC' value='680000' /> <set label='UOB' value='620000' /> <set label='DBS' value='610000' /> <set label='OCBC' value='490000' /> <set label='OCBC' value='530000' /> <set label='DBS' value='330000' /> <styles> <definition> <style name='CanvasAnim' type='animation' param='_xScale' start= '0' duration='1' /> </definition> <application> <apply toObject='Canvas' styles='CanvasAnim' /> </application> </styles> </chart> And this is my .xsl file <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="chart"> <xsl:apply-templates select="label"> <xsl:sort order="ascending" /> </xsl:apply-templates> </xsl:template> </xsl:stylesheet> I had another try: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output indent="yes"/><xsl:strip-space elements="*"/><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()"><xsl:sort select="@value"/></xsl:apply-templates></xsl:copy></xsl:template></xsl:stylesheet> But both cannot work... please help me... Thank you!!!
  12. Convert XML to Excel

    Hello everyoneI need to transform an XML file to Excel. The style sheet (XSL) should be applied on import. There appears to be an acknowledged bug:http://support.microsoft.com/kb/307230/en-USThe workaroudn involves converting XML to HTML first, then to Excel-format. The script is in VBA:Sub Macro3()'Load the XML and the XSL (the stylesheet).Dim oXML As Object, oXSL As ObjectSet oXML = CreateObject("MSXML.DOMDocument")Set oXSL = CreateObject("MSXML.DOMDocument")oXML.Load "c:customers.xml"oXSL.Load "c:customers.xsl"'Transform the XML using the stylesheet.Dim sHTML As StringsHTML = oXML.transformNode(oXSL)'Save the results to an HTML file.Open "c:customers.htm" For Output As #1 '!fails herePrint #1, sHTMLClose #1'Automate Excel to open the HTML file.Dim oApp As Excel.ApplicationSet oApp = CreateObject("excel.application")oApp.Visible = TrueoApp.Workbooks.Open "c:customers.htm"End SubConverted to VBScript the code fails at the line indicated above, presumably because VBScript does not know the method. I'm not proficient in VBScript so any help is appreciated
  13. cell with variable dimensions

    <xsl:variable name="A" select="count($TEST)"/><cell dim="A 1"> %%% here i want to have the value of A <xsl:for-each select="$TEST"> <struct dim="1 1"> <rec>...........</struct></cell> Hi, I want define a cell/struct field and the Dimension of the cell should be flexible, according to the Input.here is a what i want to have:
  14. JavaScript ajax xml response

    What I'm trying to do is use an xml DOM created in php to display on my webpage using an ajax call. I'm pretty sure this is a JavaScript problem, but it's possible there may be an issue with my php code. Part of the php code is below if needed. The reason I believe the php code is fine, is because if I go directly to the page and uncomment the saveHTML() line, it displays fine. The first code below is my ajax call. I think the call fails, because what I get is the alert error message in my code (An error has occured). I'm not sure what the issue is. Thanks for any suggestions. request = $.ajax({ url: "results.php", type: "POST", dataType: "xml" }).done(function (data){ $(data).find("stat").each(function(){ $("result").append($(this).find("fName").text() + "<br>"); }); }).fail(function (){ alert("An error has occured."); }); $result=mysqli_query($con,$cmd);$doc = new DOMDocument("1.0", "utf-8"); $root = $doc->createElement('stats'); $doc->appendChild($root); while($row=mysqli_fetch_array($result)){ // Creates the main xml element stat $element = $doc->createElement("stat"); // Declares variables from SQL table to be used for sub-elements $fName = $row['fName']; $lName = $row['lName']; $position = $row['position']; $pYard = $row['pYard']; // Create sub-elements $pfName = $doc->createElement("fName", $fName); $plName = $doc->createElement("lName", $lName); $pPosition = $doc->createElement("position", $position); $pPYard = $doc->createElement("pYard", $pYard); // Add sub-elements to main element stat $element->appendChild($pfName); $element->appendChild($plName); $element->appendChild($pPosition); $element->appendChild($pPYard); // Add main element to root $root->appendChild($element); } //echo $doc->saveHTML(); echo $doc;
  15. hello to all, I'm newbie with XML, XSL and I've been trying and I'm only getting the first 2 rows(headers) of the output desired so far. May somebody help me in how to get output of table below with an xsl stylesheet using the XML input below. The XML input is: <?xml version="1.0" encoding="UTF-8"?><TUPH><KIND><ABx>Event 1</ABx><RN><MO><CDy>11</CDy><CDy>5</CDy> </MO> <MO><MJp>6</MJp><MJp>7</MJp><MJp>9</MJp> </MO> </RN><JN><MO><CDy>8</CDy> </MO> <MO><MJp>1</MJp><MJp>3</MJp> </MO> </JN> </KIND><KIND> <ABx>Event 2</ABx><RN><MO><CDy>3</CDy></MO> <MO><MJp>5</MJp></MO> </RN><JN><MO><CDy>6</CDy></MO> <MO><MJp>2</MJp></MO> </JN></KIND> </TUPH> ​The XSL I have so far is: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output indent="yes" method="html"/> <xsl:template match="/"><html><table border="1"><tr><td></td><td>RN</td><td></td><td>JN</td><td></td> </tr><tr><td>ABx</td><td>CDy</td><td>MJp</td><td>CDy</td><td>MJp</td> </tr><xsl:apply-templates select="KIND"/> </table> </html></xsl:template> <xsl:template match="KIND/ABx"><td> <xsl:apply-templates select="ABx"/></td></xsl:template> </xsl:stylesheet> The output I'm looking for is: <html> <table border="1"> <tr> <td></td> <td>RN</td> <td></td> <td>JN</td> <td></td> </tr> <tr> <td>ABx</td> <td>CDy</td> <td>MJp</td> <td>CDy</td> <td>MJp</td> </tr> <tr> <td>Event 1</td> <td>11</td> <td>6</td> <td>8</td> <td>1</td> </tr> <tr> <td></td> <td>5</td> <td>7</td> <td></td> <td>3</td> </tr> <tr> <td></td> <td></td> <td>9</td> <td></td> <td></td> </tr> <tr> <td>Event 2</td> <td>3</td> <td>5</td> <td>6</td> <td>2</td> </tr> </table> </html> Thanks in advance for any help.
  16. Hello all, first time poster on the forum and I can get some insight on how to solve a problem I am having. I hope its rewarding for you as well. A little background, I am using an xml file that is exported from Autodesk Civil 3D that list Pay Items, Quantities, and Units for Road Construction estimates. My goal is to harness this xml file to include unit prices and then create a total cost per pay item. You will see there is a field for <estimatedUnitPrice> and I would but in a price there for each item. For now I can not even use the xsl file and the html file to get a table to generate that will list each pay item. Below is the code, and I have attached a picture of the results of running this code via Visual Web Developer Express, as may see it will not list the pay item <gml:description> which I expect. XML file Named "Summary (XML)" This file comes directly from Autodesk Civil 3D, I only have one pay item listed here for brevity sake, normally there would be many <item> sections. <?xml version="1.0" encoding="UTF-8"?><DesignProject xsi:schemaLocation="http://www.transxml.net/schema/dp/0.3 DP-GML20060123pxs.xsd" gml:id="ID001" xmlns="http://www.transxml.net/schema/dp/0.3" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:txl="http://www.transxml.net/schema/txl/0.3" xmlns:rpi="http://www.transxml.net/schema/rpi/0.3" xmlns:lr="http://www.transxml.net/schema/lr/0.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <gml:name>design project</gml:name> <gml:description></gml:description> <projectID>ID001</projectID> <unitSystem>english</unitSystem> <group> <DesignProjectPayItemGroup gml:id="dppig1"> <gml:description></gml:description> <designProjectPayItemGroupID>dppig1</designProjectPayItemGroupID> <item> <DesignProjectPayItem gml:id="id"> <sequenceOrder>0</sequenceOrder> <estimatedUnitPrice>0</estimatedUnitPrice> <estimatedQuantity>4558.445</estimatedQuantity> <referencePayItem> <ReferencePayItem gml:id="60201-0600" xmlns="http://www.transxml.net/schema/ref/0.3"> <gml:description>18-INCH PIPE CULVERT</gml:description> <referencePayItemID>60201-0600</referencePayItemID> <specBookVersion></specBookVersion> <lumpSum>false</lumpSum> <supplementalDescriptionRequired>false</supplementalDescriptionRequired> <unit> <txl:UnitOfMeasure> <txl:unitOfMeasureID>LNFT</txl:unitOfMeasureID> <txl:unitSystem></txl:unitSystem> </txl:UnitOfMeasure> </unit> </ReferencePayItem> </referencePayItem> <referenceInformation xmlns="Civil3D.QTO.Computation"> <unitType>linear</unitType> <listSeparator>,</listSeparator> </referenceInformation> </DesignProjectPayItem> </item> </DesignProjectPayItemGroup> </group></DesignProject> XSL File Named "Detailed" I got thie file from an example for W3Schools Tutorials. I changed only what was in bold, and deleted a second column that was in the org example. <?xml version="1.0" encoding="iso-8859-1"?><!-- Edited by XMLSpy® --><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th>Description</th> </tr> <xsl:for-each select="DesignProject/group/DesignProjectPayItemGroup/item/DesignProjectPayItem/ReferencePayItem"> <tr> <td> <xsl:value-of select="gml:description" /> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template></xsl:stylesheet> HTM file named "Detailed" Again this file source code came from a tutorial and I changed the file names that are in bold below. <html><head><script> function loadXMLDoc(filename) { if (window.ActiveXObject) { xhttp = new ActiveXObject("Msxml2.XMLHTTP"); } else { xhttp = new XMLHttpRequest(); } xhttp.open("GET", filename, false); try { xhttp.responseType = "msxml-document" } catch (err) { } // Helping IE11 xhttp.send(""); return xhttp.responseXML; cription } function displayResult() { xml = loadXMLDoc("Summary (XML).xml"); xsl = loadXMLDoc("Detailed.xsl"); // code for IE if (window.ActiveXObject || xhttp.responseType == "msxml-document") { ex = xml.transformNode(xsl); document.getElementById("example").innerHTML = ex; } // code for Chrome, Firefox, Opera, etc. else if (document.implementation && document.implementation.createDocument) { xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); resultDocument = xsltProcessor.transformToFragment(xml, document); document.getElementById("example").appendChild(resultDocument); } }</script></head><body onload="displayResult()"><div id="example" /></body></html>
  17. foreach() error

    I want to export videos, thumbs, duration, etc from my website into a xml format. I got this error: Invalid argument supplied for foreach() $output .= ' <clips>';if (!is_array( $vids )) { $vids = array( ); foreach ($imgs as $img) { $img = explode( '.', $img ); $vids[] = '0' . $img[0] . '.flv'; }}@sort( $vids );@sort( $imgs );$i = 38;foreach ($vids as $v) { $output .= ' <clip>'; $output .= ' <duration>' . $duration . '</duration>'; $output .= ' <width>' . $width . '</width>'; $output .= ' <height>' . $height . '</height>'; $output .= ' <flv>' . $v . '</flv>'; $output .= ' <screens> <screen>' . trim( $imgs[$i] ) . '</screen> </screens>'; $output .= ' </clip>'; ++$i;}$output .= ' </clips>'; Thank you!
  18. how to add download link

    hi i'm trying to fetch result from other website i'm able to fetch from other website but i'm willing to give a option for user to have pdf download link . how can i convert html data to pdf link while it fetch result from other website itself ex: i'm trying to fetch result from one of the univ website where results will be announced.i'm trying to fetch result sheet from that website http://www.result.vtu.ac.in/vitavi.php but i'm willing to give download link to user but i'm unable to do it plz help out
  19. Migration of pages

    Hi All, We are designing amobile application based on Oracle Siebel. We are stuck on mobile build. We are facing the problem on navigating from first html page to another.Actually what is happening in Vanilla Object Manager 'Siebel Self Service Wireless (ENU)' is after login page only one html page is defined which is Main page/Dashboard page. But in our mobile build wireframe, it has two html pages after login. But in tools at application level, we define only 'acknowledgement page' which is Main Page and its corresponding .swt and .xsl file.So our problem is to figure out how it will navigate from main page to next html page and to subsequent pages after that. Any help in this matter would be highly appreciated.
  20. Need to Link Social Icons

    I just need help please with linking to my facebook correctly. Please be nice , and I'm sure this is pretty easy for everyone else, but I am having trouble with it. I have attached the file and image, if anyone can be good enough to help me out. My email is cafedesignercafe@gmail.com My Skype is evolution2design My facebook is facebook.com/rcmp004 Thank you so much ! config.xml
  21. I have been trying to find a solution to my problem is the last 10 days, and I found nothing. So, I am trying to restrict the Authentication Context XML Schema Definition of SAML 2.0. The XSD document is accessible at http://docs.oasis-open.org/security/saml/v2.0/saml-schema-authn-context-types-2.0.xsd. The part that I am trying to restrict is the one related to this part of the XSD document: <xs:complexType name="PasswordType"> <xs:sequence> <xs:element ref="Length" minOccurs="0"/> <xs:element ref="Alphabet" minOccurs="0"/> <xs:element ref="Generation" minOccurs="0"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/></xs:complexType><xs:element name="RestrictedPassword" type="RestrictedPasswordType"/><xs:complexType name="RestrictedPasswordType"> <xs:complexContent> <xs:restriction base="PasswordType"> <xs:sequence> <xs:element name="Length" type="RestrictedLengthType" minOccurs="1"/> <xs:element ref="Generation" minOccurs="0"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/> </xs:restriction> </xs:complexContent></xs:complexType> Well, I do not know how to restrict the RestrictedPassword complex Type. Below is my XSD, that tries to restrict the original XSD document. <?xml version="1.0" encoding="UTF-8"?><xs:schema version="2.0" targetNamespace="urn:m:SAML:2.0:ac:classes:K" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:m:SAML:2.0:ac:classes:K" finalDefault="extension" blockDefault="substitution"> <xs:redefine schemaLocation="http://docs.oasis-open.org/security/saml/v2.0/saml-schema-authn-context-types-2.0.xsd"> <xs:complexType name="RestrictedPasswordType"> <xs:complexContent> <xs:restriction base="RestrictedPasswordType"> <xs:sequence> <xs:element ref="Length" minOccurs="0"/> <xs:element ref="Generation"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:redefine> </xs:schema> When I try to validate this XSD in this tool http://www.utilities-online.info/xsdvalidation/#.UwJAzK69h31 it returns me an error, that I do not know how to fix. Any help is welcome. Thanks! Domenech, Marlon
  22. Some quick context to what I'm doing. I'm utilizing a test automation tool called SOASTA. What this software allows me to do is record performed actions on a mobile device and then play back those same actions at anytime. When recording actions, SOASTA will assign the action performed a random locator value. This value can be modified to equal a specific XPATH value. On the mobile application I'm recording action on, I have 3 files stored called TEST SIGN.doc, TEST SIGN.docx, and TEST SIGN.pdf, separated by the node <RelativeLayout> in the XML code shown below. Each of these files have a button on them that when tapped, opens a window to perform certain actions. In the XML hierachy, these three buttons are all assigned the same value of, <DontPressWithParentImageView touchTestId="img_item_action"/>. My question is, is there an XPATH that will allow me to distinguish between the 3 buttons even though the buttons have the same values? THANK YOU IN ADVANCE!! <ListView touchTestId="16908298"> <RelativeLayout> <ImageView touchTestId="img_icon"/> <TextView text="TEST SIGN.doc" touchTestId="txt_title"/> <TextView text="21.5 KB, modified Jan 20, 2014 03:36 PM" touchTestId="txt_info"/> <CheckBox text="" touchTestId="checkbox"/> <View touchTestId="divider"/> <DontPressWithParentImageView touchTestId="img_item_action"/> </RelativeLayout> <RelativeLayout> <ImageView touchTestId="img_icon"/> <TextView text="TEST SIGN.docx" touchTestId="txt_title"/> <TextView text="12.6 KB, modified Jan 20, 2014 03:36 PM" touchTestId="txt_info"/> <CheckBox text="" touchTestId="checkbox"/> <View touchTestId="divider"/> <DontPressWithParentImageView touchTestId="img_item_action"/> </RelativeLayout> <RelativeLayout> <ImageView touchTestId="img_icon"/> <TextView text="TEST SIGN.pdf" touchTestId="txt_title"/> <TextView text="12.7 KB, modified Jan 20, 2014 03:36 PM" touchTestId="txt_info"/> <CheckBox text="" touchTestId="checkbox"/> <View touchTestId="divider"/> <DontPressWithParentImageView touchTestId="img_item_action"/> </RelativeLayout></ListView>
  23. New to XML and need help interpreting stuff

    Hi, I need to know which are the correct answers in the following MCQ type XML code. 1. Example 1 - Only one answer is correct out of the following. <?xml version="1.0" encoding="UTF-8" ?> - <pages sgxmlv="1.2"> - <page> <template>q1.swf</template> <title /> - <pics> <pic /> <pic /> <pic /> <pic /> <pic /> </pics> - <sounds> <snd /> <snd /> <snd /> <snd /> <snd /> </sounds> - <texts> <txt a="X" c="X" e="-3" pt="1" s="2">How do Club Associations secure their economic position?</txt> <txt crct="83" c="X" s="2">From a system of mutual support.</txt> <txt crct="91" c="X" s="2">From levying high premiums on owners.</txt> <txt crct="48" c="X" s="2">By pursuing strong counter claims through the courts.</txt> <txt crct="99" c="X" s="2">By minimizing insurance settlements through clever interpretation of insurance rules.</txt> </texts> - <soundTexts> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> </soundTexts> </page> <subpages /> </pages> 2. Example 2 - More than one answer is correct out of the following. <?xml version="1.0" encoding="UTF-8" ?> - <pages sgxmlv="1.2"> - <page> <template>q1.swf</template> <title /> - <pics> <pic /> <pic /> <pic /> <pic /> <pic /> <pic /> <pic /> </pics> - <sounds> <snd /> <snd /> <snd /> <snd /> <snd /> <snd /> <snd /> </sounds> - <texts> <txt a="X" c="X" e="-3" pt="1" s="2">In respect of goods which are intended to be, or being, or which have been carried in the transport, which of the following claims are covered by Club insurance? (Select all appropriate answers)</txt> <txt crct="83" c="X" s="2">Loss.</txt> <txt crct="84" c="X" s="2">Short delivery.</txt> <txt crct="5" c="X" s="2">Theft.</txt> <txt crct="66" c="X" s="2">Damage.</txt> <txt crct="80" c="X" s="2">Loss of commercial value during transit.</txt> <txt crct="101" c="X" s="2">Damage whilst in independent storage.</txt> </texts> - <soundTexts> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> <sndTxt /> </soundTexts> </page> <subpages /> </pages> These are computer based training modules. The assessment is coded in XML and i need to know the correct answers in order to pass. How do i interpret the above to finding the right answers. XML Experts you help is highly appreciated.
  24. New to XML and Confused

    Alright. Forgive me if this is a really dumb question, but I think I'm missing some crucial information here. Is there any good, simple way, to embed a little XML data in an HTML document? Not a whole sheet, just one node. For instance, say I've made an XML document describing a book. Is there a simple way to embed the info held in the <AUTHOR> tag in an HTML document as plain text? Example: Author: <embedded XML bit goes here> Thanks, and sorry if I'm really missing something important here.
  25. How can I get the value of an attribute and use it in a conditional statement. For example I have <O Option="a" LineNr="1"> and this is element is a child under another parent element that gets grouped with other elements. So the condition I want is: if [value-of Option is null] then [do nothing] else-if [check if the value of the attribute of the element under the next parent element with the same value is empty]. And if there are for example 3 parent elements that contain this element with the Option attribute and if all of the attributes are NOT empty - then group them. I have the grouping done, but it is not connected with this attribute that I want to use now. So I need just the formulation of the conditional statements. edit: giving input and output desired examples Input example 1: <Area><Type>A</Type><Street><Position>5</Position><House><L Option="" LineNr="1">--> some elements</L></House></Street><Street><Position>5</Position><Block><O Option="" LineNr="1">--> some elements</O></Block></Street><Street><Position>6</Position><House><L Option="o" LineNr="1">--> some elements</L></House></Street><Street><Position>6</Position><Block><O Option="" LineNr="1">--> some elements</O></Block></Street></Area> And desired output: <Area><Type>A</Type><Street><Position>5</Position><House><L Option="" LineNr="1">--> some elements</L></House><Block><O Option="" LineNr="1">--> some elements</O></Block></Street><Street><Position>6</Position><House><L Option="o" LineNr="1">--> some elements</L></House><Block><O Option="" LineNr="1">--> some elements</O></Block></Street></Area> But if in the same position number, all the occurrences have a value in the Option attribute of L or O, then I want them arranged under the other occurrence of a position number. Like that: Input example 2: <Area><Type>A</Type><Street><Position>5</Position><House><L Option="" LineNr="1">--> some elements</L></House></Street><Street><Position>5</Position><Block><O Option="" LineNr="1">--> some elements</O></Block></Street><Street><Position>6</Position><House><L Option="o" LineNr="1">--> some elements</L></House></Street><Street><Position>6</Position><Block><O Option="a" LineNr="1">--> some elements</O></Block></Street></Area> Then the output will be: <Area><Type>A</Type><Street><Position>5</Position><House><L Option="" LineNr="1">--> some elements</L></House><Block><O Option="" LineNr="1">--> some elements</O></Block><House><L Option="o" LineNr="1">--> some elements</L></House><Block><O Option="a" LineNr="1">--> some elements</O></Block></Street></Area> as now position 6 is gone and its child elements are grouped under the upper occurrence position (which is 5 in this case in the same Type) as all of the attributes Option in the L or O elements had value (which can be either "a" or "o", if that is relevant). And this is the XSLT which I am using now. It only groups the elements of the different occurrences of the same position numbers under one number: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:strip-space elements="*" /><xsl:output method="xml" indent="yes" /><xsl:key name="streetByPosition" match="Street" use="concat(../Type, '|', Position)" /><xsl:template match="@*|node()"><xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy></xsl:template><!-- for the first Street in each Position --><xsl:template match="Street[generate-id() =generate-id(key('streetByPosition', concat(../Type, '|', Position))[1])]"><Street><!-- copy in the Position element once only --><xsl:apply-templates select="Position" /><!-- copy in all sub-elements except Position from all matching Streets--><xsl:apply-templates select="key('streetByPosition', concat(../Type, '|', Position))/*[not(self::Position)]" /></Street></xsl:template><!-- ignore all other Street elements --><xsl:template match="Street" /></xsl:stylesheet> I really, really need solution for that and I have no clue how to do it, especially the checks.
×