xml

XMLReader : how to catch syntax errors in the xml file ?

Hi, I have an XML file with syntax errors. eg. <Viewport thisisbad Left="0" Top="0" Width="1280" Height="720" > When i create an XML reader it does not throw any errors. I there a way to do syntax checking automatically, like XMLDocument does ? I have tried setting various XmlReaderSettings flags but found nothing useful. ...

How to convert an xml feed to html

Hi, I have a xml feed which needs to be converted to HTML. How can it be done? If somebody has any references on how to do it pls let me know. i need to show the feed in a wordpress site. Thanks Prady ...

MalformedByteSequenceException while trying to pars XML

Hey guy, maybe someone can help: I have the following .gpx data from wikipedia: <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <gpx xmlns="http://www.topografix.com/GPX/1/1" creator="byHand" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.to...

How to query an XML File with E4X in AS3?

I need to archive a database-driven flash as3 website. I exported a table to xml so now i have something like this: <RECORDS> <RECORD> <id>home</id> <msg>bodytext</msg> <type>0</type> <lastEditDate>0000/0/0 00:00:00</lastEditDate> <lastAccessDate>2009/6/17 11:37:21</lastAccessDate> <timesAccessed>855</timesAcce...

Advice on simple efficient way to store web form data when no db/auth required

Hi, I have a situation where I need to provide an efficient way to process and store comments submitted via a web form. I would normally use PHP and either MySQL or XML to store the data, but this is slightly different in that this web form will only be temporarily available in a closed LAN environment, and all i need to do is process th...

XSLt.transform gives me ""

Hi, I have XML: <results> <Countries country="Albania"> <Regions region="Centralna Albania"> <Provinces province="Durres i okolice"> <Cities city="Durres" cityCode="2B66E0ACFAEF78734E3AF1194BFA6F8DEC4C5760"> <IndividualFlagsWithForObjects Status="1...

Idiomatic way to build a custom structure from XML zipper in Clojure

Say, I'm parsing an RSS feed and want to extract a subset of information from it. (def feed (-> "http://..." clojure.zip/xml-zip clojure.xml/parse)) I can get links and titles separately: (xml-> feed :channel :item :link text) (xml-> feed :channel :item :title text) However I can't figure out the way to extract them at the same tim...

Save XML to Recordset

Hi All, I am working on android, and I am parsing a huge XML file. so all the time I need to get some data from that XML file, which is making the application very slow. Is there any way that I can create a data set/record set/result set of the XML file so that later I can get the data from the newly created set. and also how to read...

Replacing XML in File from "Document" in Java

Hi, after processing my first steps in working with XML in java I am now at the point where I want to update some data in my XML/GPX file... Reaplacing it in my "Document" data type works great :) How here comes the question: how can I store the changed "document"-model back to my file? Do I have to do this by using the standart file-...

Sort XML nodes with PHP

I have a serialized string comming in with POST: $imgdata = $_POST['imgdata']; // li[]=2&li[]=3&li[]=1&li[]=4 In this example 001 is reordered after 003 How can I update my XML file with this new order? I think I need simpleXML or xpath. Here are my thoughts: // 1. load xml string $xml = simplexml_load_file('test.xml'); /* <?xml vers...

Problem with linq-to-xml

I want by linq save my xml in csv and I have o problem. This bracket are here beacuse without it this code is not displaying (why ? ) <results> <Countries country="Albania"> <Regions region="Centralna Albania"> <Provinces province="Durres i okolice"> <Cities city="Durres" cityCode="2B66E0ACFAEF78...

utf8 format in xml

i want to know how to store this è (this type of symbols) in xml file if i store this symbol in xml file.. the file shows this symbol like � i was inserted in front of xml file is <?xml version="1.0" encoding="UTF-8"?> but that doest not shows correct thanks and advance ...

Copying an xml file with inserting new elements in a specific location- C#

Hi I want to copy an xml file and insert in a specific element locaiton some more elements; What is the best and easiest way doing this. I can use xmlReader read elements and write one by one referring to each and every type- I had some issues with this but besides this seems to me too mush work that can be done somehow better. in the ex...

Update XML as Upper Case in SQL Server

I store an XML string in a column in my SQL Server database. I'm trying to run an UPDATE statement that will make a certain field into Upper Case. I can do that easily during a SELECT but can't get it to work with an update. This SELECT statement works select Upper(XmlTest.value('(/CodeFiveReport/Owner/@UnitNumber)[1]', 'varchar(10)'...

Where can I find a list of all possible messages that an XmlException can contain?

I'm writing an XML code editor and I want to display syntax errors in the user interface. Because my code editor is strongly constrained to a particular problem domain and audience, I want to rewrite certain XMLException messages to be more meaningful for users. For instance, an exception message like this: '"' is an unexpected token...

xml data lost in JSON conversion

I am getting the following result from converting xml to JSON, using more than one conversion library. As you can see, the property name attributes are lost, as are the Item name attributes. Why? Does anyone have recommendations on how I might change my XML to make it more conversion friendly? <Asset name="xyz"> <Property name="p1">V...

How to remove "special characters" from XML?

Is there a .NET (2.0) framework method to remove the XML special characters? Like " & etc. It's easy enough to write one, but I'd rather use the framework's if one is available. ...

Keep DTD after XML Transform

Hi, I am transforming an XML document but after the transform my DTD goes away and also the first line which tells the XML version is missing. <?xml version="1.0"?> The code I am using to transform the XML file is: // Load the style sheet. var xslt = new XslCompiledTransform(); xslt.Load("XSLTFile1.xslt"); ...

XmlDocument.InnerXml is null, but InnerText is not

I'm using XmlDocument and XmlElement to build a simple (but large) XML document that looks something like: <Widgets> <Widget> <Stuff>foo</Stuff> <MoreStuff>bar</MoreStuff>...lots more child nodes </Widget> <Widget>...lots more Widget nodes </Widgets> My problem is that when I'm done building the XML, the Xm...

XML::XML2JSON "0" Element

I'm using XML::XML2JSON in Perl to convert JSON data to XML, I am passing through the following data (snippet): {"question":{"isrequired":{"$t":"0"}}} and when I use the XML:XML2JSON->json2xml function to convert the JSON data into XML, I get the following (snippet): <isrequired/> I need to retain the "0" element in the "isrequired...