xml

Problem with javax.xml.transform.Transformer. Empty element not showing properly in editor but in Browser.

I have used javax.xml.transform.Transformer and javax.xml.transform.TransformerFactory and org.w3c.dom.Element and org.w3c.dom.Node to create XML file as per my requirement. Its creating XML successfully. The only problem is : <MYADDRESS NAME="AA00001"> <ATTN1>a</ATTN1> <ADDRESS></ADDRESS> // This is empty ADDRE...

Saving objects as favourites using Core Data and XML parsing

I am working on a project where the app parses data from an XML file, saves it to a persistent store and populates a table view. Every time the app opens, if there is internet connection available, the persistent store gets recycled and the XML is parsed again as it gets updated quite frequently. If no internet connection is available I'...

How to skip invalid characters in XML file using PHP

I'm trying to parse an XML file using PHP, but I get an error message: parser error : Char 0x0 out of allowed range in I think it's because of the content of the XML, I think there is a speical symbol "☆", any ideas what I can do to fix it? I also get: parser error : Premature end of data in tag item line What might be caus...

How do you use XPath to confirm whether a Form element is found in the passed in markup for loadXML?

Set objNoFormCheckXMLDOM = CreateObject("Microsoft.XMLDOM") objNoFormCheckXMLDOM.async = "false" objNoFormCheckXMLDOM.setProperty "SelectionLanguage", "XPath" objNoFormCheckXMLDOM.LoadXML(strHtmlResponse) Set nlForms = objNoFormCheckXMLDOM.selectNodes("form") I have the above VBScript in a function. strHtmlResponse contains t...

Importing and shredding XML into SQL Table

Hi i hope someone can help me, i am trying to import XML elements into an SQL Table, in XML format. To start with i have an XML file called Chassis.xml that looks like this. <Chassis> <Chassis Id="1" Chassis="blah blah" Suitability="1" Structured="1" /> <Chassis Id="2" Chassis="blah blah" Suitability="1" Structured="1" /> <Chassi...

Which browser can show XML data transformed by XSLT?

say, if there is a file that's call data.xml, and a file that is format.xsl (or is it format.xml ?), which is to transform the XML data and format it as well using CSS, then which browser can display it? Which file should be opened? (the .xsl or the .xml?) Actually I saw in another example that the XSLT file's first line is to href="f...

Formatting string for xml attribute in php

I have some strings that are valid in my database but when I include them in an attribute of a UTF-8 XML output they give me the following error: XML Parsing Error: not well-formed My current code (simplified): header('Content-Type: text/xml'); echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'; echo '<root attribute=...

Is there a way to embed on code snippet into another?

Let's assume that I have snippet A snippet B where snippet A contains snippet B n times with n > 1. Right now I have copied the content of snippet B into snippet A. This has the disadvantage, that whenever I change snippet B, I have to additionally change snippet A. Therefore, my question is whether there is some kind of statemen...

What I got data files as data.xml, how to add the stylesheet link to those data files?

It looks like if the data files fetched from data source already contain <?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd> <title>Empire Burlesque</title> ... then the correct way to make the data displayable on a browser is to create a .xsl file, and then make the .xml file contain one more line (the second line below): ...

Is using XML and XSLT a good way to make a webpage?

I just learn of ways to use XML data file and XSLT to create a webpage (transform from XML to HTML or XHTML). But I have never seen a webpage that has the source code of XML with a link to an XSLT file. Is it not a good solution? ...

Which is the best methode for xml validation in java?

Hi, I want to create a validator for xml using xsd schema in java language. When I searched in the internet I found 3 meothods using javax.xml.validator, using jaxp parser, using sax parser. Can you please suggest which is the best methode in these 3? ...

Reference an XSD file from different XMLs sitting in different project modules?

I have an XSD file that is referenced in three different XML files in different project modules using: <item-groups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xml_schemas/item_groups.xml.xsd"> I have been trying to figure how to avoid manually copying the XSD into every module that needs it, s...

How does Ruby's REXML or REXML::XPath take an element and access its children nodes?

If the following code in Ruby can print out "browser type" and "count" individually as 2 separate lists, can REXML select each entry and then print out entry['title'].text and entry['dxp:metric'].attr('value') /* not using exact syntax */ on the same line as one list? require 'rexml/document' include REXML xmlfile = File.new("data....

History (updates, price drops) of Apps on the Apple App Store accessible via XML?

In an attempt to build a site that lists Apps from the iTunes App Store, I need to gather the information from the App Store. I have found a way to get the XML that gets rendered by iTunes to create the App Store pages inside iTunes, but I'd like to get more information. I'd like to be able to get an App's history, i.e. price changes, u...

Dealing with concurrent access to an XML file using a java server

In the application Im writting the server will have information abuot the users, using a XML databse. The admin user will be able to write/read information on those files too. How can I deal with concurrent access to those files? The only way users/admin can read/write to those files is by requesting to the server(Sockets, TCP connection...

Closing open XML tags with regex

Basically I want to do the same as here which is done in Python. I'd like to replace all self-closed elements to the long syntax. Example <iframe src="http://example.com/thing"/&gt; becomes <iframe src="http://example.com/thing"&gt;&lt;/iframe&gt; Full example: <html> <head> <meta http-equiv="Content-Type" content="tex...

Defining XSD to validate groups of permitted XML attributes for the same element

I would like to define an XSD that would validate the following XML. <parameters> <param name="Maximum Error Threshold" type="integer">10</param> <param name="Auto Shutdown Timeout Duration" type="integer" unit="seconds">300</param> <param name="Flow Rate Adjusment" type="integer" unit="litrePerSec">0.5</param> <param na...

Setting a timeout on XmlDataSource in VB.NET XML Feed slow sometimes

Hey I have a XML Feed which is sometimes slow to connect to making my front page quite slow to load sometimes. I load it as follows Try XmlDataSource.DataFile = "http://www.rte.ie/rss/news.xml" XmlDataSource.XPath = "rss/channel/item [position()<=3]" dlRSS.DataSource = XmlDataSource dlRSS.DataBind() ...

problem getting xpath function ends-with() to work while contains() works fine.

hi i am trying to get the tags that have an attribute that end with a certain id. like <span id="ctl00_ContentPlaceHolder1_Country"> i want to get the spans that have the id ends with 'Country' i try the following xpath //span[ends-with(@id,'Country')] but i get the following exception "Namespace Manager or XsltContext needed. This query...

xslt: value of text associated with element

If I have an XML file that includes <param name="foo" value="5000" >foo is a way of making pasta sauce</param> <param name="bar" value="3000" >bar is controlling the beer taps</param> and I want to use XSLT to process this into an HTML file, with the name and value attributes and the text as a description, how can I get the XML node t...