Skip to content

Tag: xml

Populating an HTML table from an external XML

I have come across a problem while fetching data from an external XML document with JS. I have been following the w3schools tutorial for AJAX XML so far, but I ran into something I couldn’t solve. I have a XML that looks like this: I want to dynamically access the data inside the XML and create a table while doing

How to write an XML file with certain format using JS?

I am trying to write an XML document from an HTML form using JavaScript with the following function: JavaScript function: The file that is generated has the following format: I am trying to modify the method in order for the nodes to have the following format: I know that setAttribute() doesn’t work because it makes an attribute in the node.

Html/XML getting stuck looking for a node it shouldn’t be

I’m working on a small xml/html interface to list a bunch of buttons, and I’m having an issue with what I think is it looking for item types in nodes it shouldn’t be. The XML has a <set> of groups, and inside that will be <items> which has a <type>, a ‘button’ or ‘break’. After […]

Some content lost while parsing string to xml

I have got some HTML code through AJAX responseText, which is 350-400 lines long. It has been stored in the variable text as string and I would like to parse it to XML. However, some of the content is removed while parsing. The result ends in the script part and none of the body part […]