Jump to content

Search the Community

Showing results for tags 'xml'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. Hi all! I need to read a XML file hosted on an external Web server, but I can't find the solution. I made some tests here: https://www.w3schools.com/xml/tryit.asp?filename=try_dom_xmlhttprequest_responsexml First test: Replacing the "cd_catalog.xml" file name by the file full path: https://www.w3schools.com/xml/cd_catalog.xml Since the file is on the same server, everything is working fine. Then, I tried the same file on another server and it doesn't work anymore: https://www.webaluc.com/test/cd_catalog.xml Any solution to this problem? Thank you!
  2. Hello, I can't figure out how to write in an XML. I have an XML <line> <text id="some-id"> some text I want to change </text> <other_elements/> </line> An XSLT - to get this HTML : <html> <head> <script/> </head> <body> <textarea>TEXT I WANT TO SAVE</textarea> <!-- I write in it--> <button onclick="function(id)">clic to save</button> </body> I want to "save" what I have written in the <textarea>in my XML to have <line> <text id="some_id">TEXT I WANT TO SAVE</text> <other_elements/> </line> I don't know how to do it and as I work on only one XML I don't need to create a server... I just want the script to open the XML, change the text in the element, and close it. thank's for the help P.
  3. Dear all, Unfortunately I never learned programming properly, but I sometimes use XML to add custom content controls to Word documents and it is extremely useful to me. In Word I use the Developer > XML mapping pane - and the on the right side - XML mapping > Custom XML part to add my XML code (usually a simple .txt file) selecting the (Add new part...) from the dropdown list. Now say that I added the following code: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <XMLname xmlns="XMLID"> <item1>This is my custom XML part. It helps me greatly. I'd like to improve my knowledge and my codes.</item1> <item2></item2> </XMLname> So far so good, if I insert 'item2' as a Rich Text content control, it gives me an empty field I can freely edit. But here come my two problems: If I insert 'item1' as a Rich Text content control, it gives me a field filled with the text I set, and it will look like this: QUESTION 1: The above result is still useful (since I can edit the field as I see fit), but is there a way to add a line break? So, what I'd like to see is: Is there a simple way in XML to do this (without adding a new tag)? Something like the '\n' in HTML? QUESTION 2: Is there a simple way to make a list of the text? Again, like the <ul> tag in HTML, but without using additional tags. So for example And if there is a way, how can I add different list styles and subpoints to the points? Thank you all in advance, a simple answer to question 1 would help me a lot.
  4. OK, first and foremost, am using classic ASP as that is what I have to work with. All electronic forms in my company are currently in classic ASP. Too many of them to move to .net any time soon. That said, I have written an html form that includes sending a SOAP request to our CRM (ticketing system) which is vendor hosted. They are supplying the .net web service to the CRM's database. This will send back a response not only of a successful receipt, but also a ticket number which I am to display to the customer's screen. I am pretty comfortable with the sending part, I think. It is the response I am not so sure about. I've done XML responses through a web service before; however, I've never had a response I would have to parse before. Here are the questions that I have: 1. Are the request and response generally coded in the same envelope or separately? 2. I'm pretty comfortable displaying text received in a response using xmlhttp.responseText, but HOW would you parse the SOAP response in classic ASP? Below is the code I have for the Request: strXML = "" strXML = strXML & "<?xml version=""1.0"" encoding=""UTF-8""?>" & strCR strXML = strXML & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" & strCR strXML = strXML & " <SOAP-ENV:Header>" & strCR strXML = strXML & " <m:header xmlns:m='http://VenderURL'>" & strCR strXML = strXML & " <docType>Esr Client</docType>" & strCR strXML = strXML & " <version>3.0</version>" & strCR strXML = strXML & " <sender type='CUSTSYSID'>WIN</sender>" & strCR strXML = strXML & " <receiver type='CUSTSYSID'>CCC</receiver>" & strCR strXML = strXML & " <requestSyncType>synchronous</requestSyncType>" & strCR strXML = strXML & " <deployment.Mode>test</deployment.Mode>" & strCR strXML = strXML & " <partner type='CUSTSYSID'>" & String & "</partner>" & strCR strXML = strXML & " <transactionId>" & IntPONumber & "</transactionId>" & strCR strXML = strXML & " <timestamp>" & strTimeStamp & "</timestamp>" & strCR strXML = strXML & " </m:header>" & strCR strXML = strXML & " </SOAP-ENV:Header>" & strCR strXML = strXML & " <SOAP-ENV:Body>" & strCR strXML = strXML & " <m:serviceRequest xmlns:m='http://VendorURL' action='String'>" & strCR strXML = strXML & " <ticketInfo ticketNumber='String'>" & strCR strXML = strXML & " <refTicketNumber>" & "intPONumber" & "</refTicketNumber>" & strCR strXML = strXML & " <openedDateStamp>" & strTimeStamp & "</openedDateStamp>" & strCR strXML = strXML & " <sentDateStamp>" & strTimeStamp & "</sentDateStamp>" & strCR strXML = strXML & " <transDateStamp>" & strTimeStamp & "</transDateStamp>" & strCR strXML = strXML & " <problemDescription>" & "strCCDescription" & "</problemDescription>" & strCR strXML = strXML & " <resolution code='String' timeStamp='YYYY-MM-DDTHH:MM:SS'>" & String & "</resolution>" & strCR strXML = strXML & " <shortDescription>" & strSubject & "</shortDescription>" & strCR strXML = strXML & " <status>2</status>" & strCR strXML = strXML & " <priority internalCode='3'/>" & strCR strXML = strXML & " <severity code='3'/>" & strCR strXML = strXML & " <sla contractId=””>" & strCR strXML = strXML & " <contractName>Winn-Dixie SLA Contract</contractName>" & strCR strXML = strXML & " </sla>" & strCR strXML = strXML & " <technician.id>" & strTechnician & "</technician>" & strCR strXML = strXML & " <category name='IssueCode1'>INCIDENT</category>" & strCR strXML = strXML & " <category name='IssueCode2'>HARDWARE</category>" & strCR strXML = strXML & " <category name='IssueCode3'>BREAK / FIX</category>" & strCR strXML = strXML & " </ticketInfo>" & strCR strXML = strXML & " <entitlement>" & strCR strXML = strXML & " <code>" & CustCode & "</code>" & strCR strXML = strXML & " </entitlement>" & strCR strXML = strXML & " <contact type='primary' vip=”false”>" & strCR strXML = strXML & " <company>WINN-DIXIE</company>" & strCR strXML = strXML & " <Email>WD REQ</Email>" & strCR strXML = strXML & " </contact>" & strCR strXML = strXML & " <serviceAddress site='0'>" & strCR strXML = strXML & " </serviceAddress>" & strCR strXML = strXML & " <equipment>" & strCR strXML = strXML & " <model>" & part_no & "</model>" & strCR strXML = strXML & " <description>" & strConfigItem & "</description>" & strCR strXML = strXML & " </equipment>" & strCR strXML = strXML & " <extrinsics name='FLEX2'>" & strPartDesc & "</extrinsics>" & strCR strXML = strXML & " </m:serviceRequest>" & strCR strXML = strXML & " <SOAP-ENV:Fault>" & strCR strXML = strXML & " <faultcode>SOAP-ENV:Client</faultcode>" & strCR strXML = strXML & " <faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>" & strCR strXML = strXML & " <faultactor>http://b2bqc.compucom.com/soap</faultactor>" & strCR strXML = strXML & " </SOAP-ENV:Fault>" & strCR strXML = strXML & " </SOAP-ENV:Body>" & strCR strXML = strXML & "</SOAP-ENV:Envelope>" ' End of Request section ' Call the webservice using POST baseURL="[url="https://b2bqc.compucom.com/ws/CcEsrV4:provider"]https://b2bqc.compucom.com/ws/CcEsrV4:provider[/url]" 'Link for Production Environment Set objXmlHttp = CreateObject("MSXML2.ServerXMLHTTP.3.0") objXmlHttp.setTimeouts toResolve, toConnect, toSend, toReceive objXmlHttp.Open "POST", baseURL, False objXMLHttp.Send(strXML) Here's the code for the response: strXMLResponse = ""strXMLResponse = strXMLResponse & "<SOAP-ENV:Envelope xmlns:SOAP-ENV='[url="http://schemas.xmlsoap.org/soap/envelope/"]http://schemas.xmlsoap.org/soap/envelope/[/url]' xmlns:SOAP-ENC='[url="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/url]' xmlns:xsd='[url="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/url]'xmlns:xsi='[url="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/url]'>" & strCRstrXMLResponse = strXMLResponse & "<SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & " <serviceResponse>" & strCRstrXMLResponse = strXMLResponse & " <status code="?">string</status>" & strCRstrXMLResponse = strXMLResponse & " <statusMsg>string</statusMsg>" & strCRstrXMLResponse = strXMLResponse & " <ticketNumber>string</ticketNumber>" & strCRstrXMLResponse = strXMLResponse & " <refTicketNumber>string</refTicketNumber>" & strCRstrXMLResponse = strXMLResponse & " </ESR:serviceResponse>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Body>" & strCRstrXMLResponse = strXMLResponse & "</SOAP-ENV:Envelope>" ' XML Response from VendorresponseXML = xmlhttp.responseTextresponse.write("Your Ticket Number is: ") & "<b><font color='#cc0000' size='4'>" & responseXML & "</font></b>" Any guidance anyone can provide would be greatlly appreciated. Thanks, BillM
  5. Hi all i need to duplicate a string using javascript problem is the string was taken from an xml node so, lots of things can go wrong. this is the string: <RunList Class="Parameter" Pages="0 ~ 3" Run="1" xmlns="http://www.CIP4.org/JDFschema_1_1"> <LayoutElement> <FileSpec URL="file://xxx/xxx/Jobs/xxx/xxx/xxx/xxx/xxx/xxx.pdf"></FileSpec> </LayoutElement> </RunList> any sugetions? thanks guy
  6. At Ingolme's suggestion, I've switched from simpleXML to DOMXML for this because I need to be able to replace a node. I've done my best to follow PHP.com examples, and everything seems to work up until the point of the actual replacement. I hope you can spot what's keeping it from working. The vars found in the heredoc are assigned earlier from the customer input form. if $found is positive, it contains a cId (customer ID) that exists in the DB and should be updated with any new info (code shown). If negative, it's abs() is the cId for a new node to be added (code omitted here). In $xml, the <customer> node is child of <customers>, which is child of <root>. If I comment out the replaceChild line before the break, execution continues unhindered. Nodename reports "customer" and nodetype reports 'XML_ELEMENT_NODE' for both $node and $oldNode, so I don't know what is preventing the replacement. // SAVE CUSTOMER DATA // $found= $cId; $cId = abs($found); // Create DOM from data file $xml = new DOMDocument; $xml->formatOutput = true; $xml->load("Titles data.xml"); // Create node from customer input $str = <<<XX <customer> <cId>$cId</cId> <organization>$organization</organization> <website>$URL</website> <contact>$name</contact> <email>$email</email> <phone>$phone</phone> <addr>$address</addr> <city>$city</city> <state>$state</state> <zip>$zip</zip> <orders> <oId></oId> </orders> </customer> XX; $DOMChild = new DOMDocument; $DOMChild->loadXML($str); //turn $str into DOMDoc $node = $DOMChild->documentElement; //not sure if this is right, example suggests it is $node = $xml->importNode($node, true); //Is this necessary? examples suggest it is if ($found > 0) { //if positive, $found contains cId of desired customer $list = $xml->getElementsByTagName("cId"); //list of ID's to search for ($r = $list->length -1; $r > 0; $r--) { //find customer that fits cId if ($list->item($r)->nodeValue==$cId) { //when found, $r is index to customer node list $oldnode=$xml->getElementsByTagName("customer")->item($r);// get node to be replaced $msg=$r."—"; //$msg is included in email sent later; shows arrival here $node->replaceChild($node, $oldNode); //THIS LINE FAILS, HALTING EXECUTION break; } } }
  7. hello dears I have a problem with my word document! shows error: cannot open the file because of content error! solutions done: 1. change .docx to doc 2. open by wordpad.exe 3. upload to google drive and try to open 4. change .docx to .zip and try to open document.xml but error in opening/extracting. So I wand to know that is there any solution to fix document.xml file?
  8. I have a problem with an XML file that has the following structure: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA><FIELDS> <FIELD attrname="Id" fieldtype="i4" readonly="true" SUBTYPE="Autoinc"/> <FIELD attrname="Blocco" fieldtype="string" WIDTH="5"/> <FIELD attrname="Domanda" fieldtype="string" WIDTH="2"/> <FIELD attrname="Risposta" fieldtype="boolean"/> <FIELD attrname="Capitolo" fieldtype="string" WIDTH="2"/> <FIELD attrname="Indice" fieldtype="string" WIDTH="3"/> <FIELD attrname="Argomento" fieldtype="string" WIDTH="1"/> <FIELD attrname="SubArgomento" fieldtype="string" WIDTH="2"/> <FIELD attrname="Figura" fieldtype="string" WIDTH="4"/> <FIELD attrname="FiguraBlk" fieldtype="string" WIDTH="4"/> <FIELD attrname="Difficolta" fieldtype="string" WIDTH="2"/> <FIELD attrname="Testo" fieldtype="string" WIDTH="320"/> <FIELD attrname="Lingua1" fieldtype="string" WIDTH="320"/> <FIELD attrname="Lingua2" fieldtype="string" WIDTH="320"/> <FIELD attrname="Lingua3" fieldtype="string" WIDTH="320"/> <FIELD attrname="Commento" fieldtype="string" WIDTH="256"/> <FIELD attrname="Aiuto" fieldtype="string" WIDTH="128"/> <FIELD attrname="Foto1" fieldtype="string" WIDTH="5"/> <FIELD attrname="Foto2" fieldtype="string" WIDTH="5"/> <FIELD attrname="Foto3" fieldtype="string" WIDTH="5"/> <FIELD attrname="Foto4" fieldtype="string" WIDTH="5"/> <FIELD attrname="Foto5" fieldtype="string" WIDTH="5"/> <FIELD attrname="Video1" fieldtype="string" WIDTH="5"/> <FIELD attrname="Edl1" fieldtype="string" WIDTH="15"/> <FIELD attrname="Video2" fieldtype="string" WIDTH="5"/> <FIELD attrname="Edl2" fieldtype="string" WIDTH="15"/> <FIELD attrname="Video3" fieldtype="string" WIDTH="5"/> <FIELD attrname="Edl3" fieldtype="string" WIDTH="15"/> <FIELD attrname="Audio1" fieldtype="string" WIDTH="12"/> <FIELD attrname="Audio2" fieldtype="string" WIDTH="12"/> <FIELD attrname="Audio3" fieldtype="string" WIDTH="12"/> <FIELD attrname="Html1" fieldtype="string" WIDTH="5"/> <FIELD attrname="Html2" fieldtype="string" WIDTH="5"/> <FIELD attrname="Html3" fieldtype="string" WIDTH="5"/><FIELD attrname="Libro1" fieldtype="string" WIDTH="5"/> <FIELD attrname="Libro1PosY" fieldtype="string" WIDTH="5"/> <FIELD attrname="Libro2" fieldtype="string" WIDTH="5"/> <FIELD attrname="Libro2PosY" fieldtype="string" WIDTH="5"/> <FIELD attrname="Libro3" fieldtype="string" WIDTH="5"/> <FIELD attrname="Libro3PosY" fieldtype="string" WIDTH="5"/> <FIELD attrname="Info1" fieldtype="string" WIDTH="120"/> <FIELD attrname="Info2" fieldtype="string" WIDTH="120"/> <FIELD attrname="Gruppo1" fieldtype="string" WIDTH="3"/> <FIELD attrname="Gruppo2" fieldtype="string" WIDTH="3"/> <FIELD attrname="Gruppo3" fieldtype="string" WIDTH="3"/> </FIELDS><PARAMS AUTOINCVALUE="7166"/></METADATA> <ROWDATA> <ROW Id="2" Blocco="11023" Domanda="02" Risposta="TRUE" Capitolo="01" Indice="A01" Argomento="A" SubArgomento="1" Figura="" FiguraBlk="" Difficolta="6" Testo="I ciclomotori possono avere due o tre ruote" Lingua1="Les motocycles légers peuvent avoir deux ou trois roues" Lingua2="Kleinkrafträder können zwei oder drei Räder haben" Lingua3="I ciclomotori possono avere due o tre ruote" Commento="infatti i CICLOMOTORI possono avere DUE, TRE e anche QUATTRO RUOTE, cilindrata fino a 50 cm³ e velocità fino a 45 km/h." Aiuto="Classificazione dei veicoli." Foto1="3113" Foto2="" Foto3="" Foto4="" Foto5="" Video1="" Video2="" Video3="" Audio1="04023_40231" Audio2="" Audio3="" Html1="" Html2="" Html3="" Libro1="1" Libro2="1" Libro3="" Info1="11023" Info2="Ciclomotori"/> <ROW Id="3" Blocco="11023" Domanda="03" Risposta="TRUE" Capitolo="01" Indice="A01" Argomento="A" SubArgomento="1" Figura="" FiguraBlk="" Difficolta="5" Testo="Non tutti i veicoli a motore a due ruote vengono classificati ciclomotori" Lingua1="Pas tous les véhicules à moteur à deux roues peuvent être classifiés des motocycles légers" Lingua2="Nicht alle zweirädrigen Kraftfahrzeuge werden als Kleinkrafträder eingestuft" Lingua3="Non tutti i veicoli a motore a due ruote vengono classificati ciclomotori" Commento="infatti vengono CLASSIFICATI CICLOMOTORI solo i veicoli a DUE RUOTE con CILINDRATA NON SUPERIORE a 50 cm³ e VELOCITÀ NON SUPERIORE a 45 km/h." Aiuto="Classificazione dei veicoli." Foto1="1238" Foto2="" Foto3="" Foto4="" Foto5="" Video1="" Video2="" Video3="" Audio1="04023_40232" Audio2="" Audio3="" Html1="" Html2="" Html3="" Libro1="1" Libro2="1" Libro3="" Info1="11023" Info2="Ciclomotori"/> it continues with this structure but it is very long. How can I do from my SQL DB to extract a data ("Libro3") to insert it inside every occurrence of ''Libro3' of XML file? In my sql to recognize the line to be modified I have Id,Blocco, Libro3 obviously, but i don t know how i can modify the file. to recognize the line to be modified on the sql I have line, id and block
  9. Why does my polyline tag in SVG not accept style set inside defs tag but does in normal CSS? Here is my code: <html> <body> <style> .trapezoid2 { fill:beige;stroke:forestgreen;stroke-width:2; } </style> <center> <!-- I routinely use the center tag for older browsers. --> <svg height="400" width="800" style="border:5px double blue;background-color:tan;margin:0 auto;" > <defs> <polygon id="trapezoid1" style="fill:tan;stroke:blue;stroke-width:4;" /> </defs> <use xlink:href="#trapezoid1" points="100,200 150,100 350,100 400,200" /> <polygon id=".trapezoid2" points="400,300 450,200 650,200 700,300" style="fill:beige;stroke:forestgreen;stroke-width:2;" /> </svg> </center> </body> </html> The second trapezoid shows up but not the first. Thanks, PHPremote aka Patrick w3forum_polyline_defJune3.html
  10. Error I receive while implementing this code: Exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'employee'. One of '{contractemployee}' is expected. What changes shall I make in my code to correctly implement the xml document from the given image Code: XML: <?xml version="1.0" encoding="UTF-8"?> <company> <companyname></companyname> <address></address> <department> <dname></dname> <deptphoneno></deptphoneno> <deptfaxno></deptfaxno> <deptemail></deptemail> <employee> <empid></empid> <ename></ename> <emailid></emailid> <phoneno></phoneno> </employee> <contractemployee> <name></name> <phoneno></phoneno> </contractemployee> </department> </company> XSD: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="catalog"> <xsd:complexType> <xsd:sequence> <xsd:element name="product" maxOccurs="unbounded" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="productname" type="xsd:string"></xsd:element> <xsd:element name="storagenumber" type="xsd:short"></xsd:element> <xsd:element name="dimension"> <xsd:complexType> <xsd:sequence> <xsd:element name="width" type="xsd:byte"></xsd:element> <xsd:element name="heigth" type="xsd:string"></xsd:element> <xsd:element name="depth" type="xsd:byte" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="description" type="xsd:string"></xsd:element> <xsd:element name="supplier" type="xsd:string" maxOccurs="unbounded" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
  11. Hello! I need to know how to create a sitemap, which updates automatically according to web posts. Our company website is https://www.albacars.ae/ , a used car dealer in UAE, we post cars everyday, and it should be updated automatically on sitemap. Instead of doing this manual, is there any way to do? Thank you!
  12. Hi there, I need to create, Dynamic XML site map for our company website https://www.albacars.ae/. This should be updated automatically. Is there any way to do this? Thanks!
  13. Hello all! I'm having some discussions at work and need some clarification/help 🙂 I'm currently working on XML PACS files (pacs.008.001.02) where timestamps are being used. One of the tags is CreDtTm - Creation Date Time. A simple timestamp as far as I'm aware… Please see XSD scheme definition below: <xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.02" elementFormDefault="qualified"> ... <xs:element name="CreDtTm" type="ISODateTime"/> ... <xs:simpleType name="ISODateTime"> <xs:restriction base="xs:dateTime"/> </xs:simpleType> xs:dateTime should be in format 'CCYY-MM-DDThh:mm:ss.sss' if I'm correct? The issue now is, if I check my input XML file with the corresponding XSD and the tag filled in like (mind the year 22019) <CreDtTm>22019-10-09</CreDtTm> XMLSpy says it's valid. Even if I change the content to something rediculous, e.g. 220000000000019-10-09 XMLSpy says it's valid. Does the CC mean it is a variable lenght and not restricted to 2 digits? Please advice 🙂 Thanks a lot in advance!
  14. ale

    Advice about XML

    Hello guys, Can anybody tell me some practical example of xml??? I'm new with it. I know what is xml, syntax etc. but I am not so clear with using the same.... Thanks...
  15. According to the "Node Types" table on this W3Schools page, only the Document Node has a limit to the number of child Nodes (other than None!) of any one type: The implication is that there can be any number of any other (listed) Child node in a Parent Node. For many Nodes, that's a natural state: An Element Node can have many other Child Element Nodes to define the complete Tree. For some Nodes, it's a little less natural: For example, one might think that a Comment Node is commenting on its Parent Node. Nope! A Comment Node is merely a child of its Parent, and is likely commenting on the following (or preceding!) Sibling Node - not the Parent Node. But there are some Nodes where it's not obvious how multiple Child Nodes of the same Type should be represented. Take, for example, the Element Node. It allows - in fact needs - a Text Node as a Child Node to store the actual text of Leaf Elements. One could say that in a typical XML document, all Element Nodes have: either zero (for empty Elements), one, or multiple Child Element Nodes; or exactly one Child Text Node. But this isn't (apparently) stipulated in the standard - hence this post. If a Child list has Child Text Nodes interspersed amongst Child Element Nodes, do they just get represented like that? <Parent> This is the first piece of text from the first Text Node. <Child1> ... </Child1> <Child2> ... </Child2> This is the second piece of text from the second Text Node. <Child3> ... </Child3> </Parent> How does are multiple Child Text Nodes represented? A simple concatenation of all the Texts? In the given order? <Parent> This is the first piece of text from the first Text Node. This is the second piece of text from the second Text Node. </Parent> How does one represent Child Text Nodes of Attr Nodes, as described/permitted in the above Node Types Table? And I've not even considered EntityReference Nodes yet - which are also explicitly described as legal Child Nodes of Attr Nodes. (How?)
  16. Hi! First of all, I have very little experience with xml and I just learned yesterday about RSS feeds, so please simplify your answers if you are willing to help me. I did only read that rss uses the xml format, and apologise if I've posted this in the wrong place. I am trying to recreate an actual earth environment by using a raspberry pi that reads a RSS feed from a forecast site, which again is hooked up to an Arduino. The feed I am using is from bbc weather: https://weather-broker-cdn.api.bbci.co.uk/en/forecast/rss/3day/2525068 How can I pull certain values (temp, humidity, sunrise, and sundown) from the feed that can be stored as variables in a python code? Are there better ways of getting these values than using rss? I am not asking for help creating the code, I just wonder what options I have to research and learn to make this work. I apreciate any ideas or suggestions. This is only for private use and does not need to be the best or most complex solution, only a working one as I have to learn python as well. I do have experience with c# in case there are solutions more suited using that.
  17. Suggestion 1: I had an idea for w3school for a very long time and this idea will help people learn better and even make school suggest it more. Add in a tutorial where people will have to figure how how to fix codes like it's almost like the try-it-out but you have to go through courses and learn programming through that, almost like khan academy almost except with programming except khan academy only teaches html and not PHP. And also it wouldn't hurt to show videos of how to understand PHP more. And also how to create websites like facebook and youtube and have interactive videos as well like khan academy and those interactive videos on there was actually cool, I was amazed of how they did that when I first learned html. W3school.com actually taught me more about html and CSS more than khan academy. I just hope this forum in connecting to the website I am talking about. But w3school did have a link to this forum so I am guessing so. Suggestion 2: Also I notice some websites has custom context menus and wondering if somehow they can teach how to create that as well because I tried searching how and had to program it and I looked at other websites and it was accurate and w3school shows more accurate html and CSS. Can it be added
  18. Elvira

    insert (XML DML)

    Hello, I have datalist with three elements: <root type="object"> <DataList type="array"> <item type="object"> <DtoVersion type="number">1</DtoVersion> <RowGroup type="string">8e795a55-b670-43c7-8963-776dcf7b5bf3</RowGroup> <RowItem type="array"> <item type="object"> <Value type="string">first</Value> </item> </RowItem> </item> <item type="object"> <DtoVersion type="number">1</DtoVersion> <RowGroup type="string">dcba8598-8ff5-46bf-a6ba-fe2291856229</RowGroup> <RowItem type="array"> <item type="object"> <Value type="string">second</Value> </item> </RowItem> </item> <item type="object"> <DtoVersion type="number">1</DtoVersion> <RowGroup type="string">93d7327e-f088-402b-a9ec-65a4c6791aff</RowGroup> <RowItem type="array"> <item type="object"> <Value type="string">fourth</Value> </item> </RowItem> </item> </DataList> </root> How can I modifies the contents of an XML document, so that insert <item type="object"> <DtoVersion type="number">1</DtoVersion> <RowGroup type="string">dcba8598-8ff5-46bf-a6ba-fe2291856229</RowGroup> <RowItem type="array"> <item type="object"> <Value type="string">third</Value> </item> </RowItem> </item> BEFORE the last element? update tblData SET XmlData.modify('insert <item type="object"> <DtoVersion type="number">1</DtoVersion> <RowGroup type="string">dcba8598-8ff5-46bf-a6ba-fe2291856229</RowGroup> <RowItem type="array"> <item type="object"> <Value type="string">third</Value> </item> </RowItem> </item> into (//DataList)[1]') insert the last element in the list.
  19. sgt_spike

    DTD/XML to HTML

    As I went through the XML tutorials I kept thinking about a personal project I want to do at home. I would like to turn my iTunes library into a webpage. I just need a view only page, but something that could be automatically updated when items are added to the library. You may already know iTunes uses an xml file to store metadata about media files in the library. This xml has a dtd schema (<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">) identifying the structure of the xml (I learned this from the tutorials). I want to use the "iTunes Library.xml" to populate the web page, and since it already has a structure, I figured it would be easy to do. The problem is I don't see how to do this. Going through all the XML tutorials including the DTD tutorial, it's not clear on how to accomplish this. I tried to reference the xml tags through the DOM, it worked once, giving me the tag type. I also found that using the DOM on such a large XML could make the web page slow. I know that I could use an xslt to format the xml but I would have to reference the xslt document in the xml. Again I want it dynamic, so using the referenced iTunes dtd works. I just can't determine how to go about doing this with the tutorials. They didn't make it clear how to use the DTD to turn the xml into html Any assistance would be greatly appreciated.
  20. I've built a static site with over 40,000 pages using Jekyll. I am trying to implement a live search into it without a database. I tried the w3schools live search example with a xml file I created from my site. It is very slow. Does anyone know of a faster way to parse xml files or am I wasting time. I enabled gzip compression on the entire site also, What would be the fastest way to search a lot of records and return a result? Thanks in advance.
  21. I copied and pasted a file from the w3 tutorial XML/AJAX application but changed just a couple of spots so it could read my own XML data file. It doesn't work - what am I missing, please. When I open the console in either google or IE it says xmlDoc is null or undefined - somehow I'm not 'reading' the file or something? can anybody explain it more. I've read over the toturials a couple of times and I think it should be working. I have also cleaned out the cach in the browser by hitting cntrl F5, which I learned from someone along the way. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>S.C. Information</title> <style> table, th, td { border: 1px solid green; border-collapse:collapse; } th, td { padding: 5px; } </style> </head> <body> <button type="button" onclick="loadXMLDoc()">Get my S.C. Report</button> <br><br> <table id="demo"></table> <script> function loadXMLDoc() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myFunction(this); } }; xmlhttp.open("GET", "scTotals.xml", true); xmlhttp.send(); } function myFunction(xml) { var i; var xmlDoc = xml.responseXML; var table="<tr><th>Service Club</th><th>Seasonal Total</th></tr>"; var x = xmlDoc.getElementsByTagName("Totals"); for (i = 0; i <x.length; i++) { table += "<tr><td>" + x.getElementsByTagName("ServClub")[0].childNodes[0].nodeValue + "</td><td>" + x.getElementsByTagName("TotalAmount")[0].childNodes[0].nodeValue + "</td></tr>"; } document.getElementById("demo").innerHTML = table; } </script> </body> </html> Data File 'scTotals.xml' in same website folder. <?xml version='1.0' encoding='utf-8'?> <dataroot> <Totals> <ServClub>Beukendall Eastern Star</ServClub> <TotalAmount>$ 447</TotalAmount> </Totals> <Totals> <ServClub>Key Club</ServClub> <TotalAmount>$ 363</TotalAmount> </Totals> <Totals> <ServClub>S.I. Group</ServClub> <TotalAmount>$ 201</TotalAmount> </Totals> <Totals> <ServClub>Sarah Bilofsky & Friends</ServClub> <TotalAmount>$ 182</TotalAmount> </Totals> <Totals> <ServClub>Schenectady ARC</ServClub> <TotalAmount>$ 1530</TotalAmount> </Totals> </dataroot> Any help would be appreciated. Gil
  22. Hi all, I'm just starting to get into website design, tho' I've been a programmer for many years. I've got a site going pretty well, but I really want to update the information on the site every day using tables. I am studying the AJAX/XML method and I think I must be missing something. After using the 'display CD collection' as a model, I couldn't get it to work. So then I tried copying & pasting the actual files from the example ( they list the xml file for your reference ) into a folder and Opened it with a google browser. I can get the button that says 'create my CD collection', but nothing happens when I click it. What am I missing; is there another article that might explain this in more detail and say exactly what's going on? Thanks
  23. Hello, this is my first post on the forum, hope you can help me because I´ve been struggling with this for a few months now. I´m also noy very good at coding, so it has been mostly try and error all the way. I´m exporting an xml file from stock management program, and then importing it to a woocommerce, wordpress site. The file contains around 1600 products, but the importer plugin (wp-all-import) is only reading the first 40 products. BUT! if pass the file trough a XML formater, like this one: https://www.freeformatter.com/xml-formatter.html ... then it reads all the products. So it works but I have to add this manual step, and I like it to be automated. Link to the original file: https://www.dropbox.com/s/qqfyn1ncbux7vrs/Articulos.xml?dl=0 I´m kind of sure it has something to do with the format of the XML. Can anyone look at my original fial an tell me what is wrong with it? thanks a lot!
  24. BACKGROUND: I have recently created the content of an automatically generated podcast using a PHP Class that I found on a webpage found https://www.phpclasses.org/package/2957-PHP-Generate-RSS-2-0-feeds.html. Unfortunately, when I attempt to display the generated feed all that is displayed are the values of the input variables, or alternatively nothing (see (below)depending on the method of display. In short, the desired formatting -- the reason that I downloaded the PHP Class -- is missing. The page that creates the above result is a text file with a .php extension and a header( ) function. $rss_feed->encoding = 'UTF-8'; $rss_feed->version = '2.0'; $rss_feed->createFeed($rss_channel); header('Content-Type: text/xml; $rss_channel = the object that combines the formatting with the values of the input variables and their respective objects. The Class is relatively straight-forward and easily customized, but for two lines that I do not understand and could well be preventing the display of the XML code, if not properly configured. Interestingly, whether they are commented out or left in tact, they have no affect on what is displayed. $selfUrl = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on' ? 'http://' : 'https://'); $selfUrl .= $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; When I run the .php file the following message appears at the top of the completed page. Still nothing below the message appears. Also, I do not know the source of this message. it does not appear to come from the .php document. Now, I have not constructed a style-sheet for the Feed page, but I hardly see how this could stop the feed from appearingl Please advise.
  25. Here my question is how to print/display the numbers from pressed buttons(as shown in figure) using JavaScript. However, here I am working on a device and we have to control it from JavaScript. Below I have mentioned my code(.js) snippet:// Numbers functionfunction Numbers(cmd){System.Print("Command Sent is: "+cmd);var num = cmd;System.Print("Button pressed is: "+num);}// Displaying Numbersfunction Display(){Numbers(num);num.toString();dbgPrint("Displaying number: " + num);}And parameters for this function I am passing from some other file(.xml) as standard.<function name="Display" export="Display"><parameter name="display" type="string" description="Drag and drop this for clear-button function."></parameter></function><function name="Numbers" export="Numbers"><parameter name="command" type="mcinteger" description="Drag and drop this command for Numbers."><choice name="1" value="1"/><choice name="2" value="2"/><choice name="3" value="3"/><choice name="4" value="4"/><choice name="5" value="5"/><choice name="6" value="6"/><choice name="7" value="7"/><choice name="8" value="8"/><choice name="9" value="9"/><choice name="0" value="0"/></parameter></function>
×
×
  • Create New...