xml

Add Ampersand to XmlElement

I am creating several XmlElements used in a larger XML Document. XmlElement thisElement = xmlSearchParameters.CreateElement("value"); thisElement.InnerXml = this.searchParameters[key]; This works well for most instances, but if the value of searchParameters[key] happens to include an & symbol, I get one of the two following errors: ...

Downsides (If any) With SQL Server 2005 XML Datatype

I have a need to record XML fragments in a SQL Server 2005 database for logging purposes (SOAP messages, in this case). Is there any reason to use the XML datatype over a simple varchar or nvarchar column? I can see instances already where being able to use XPath to get into the data in the XML would be rather nice, and I haven't been a...

struts.xml cant find action or result

New to struts Here is the error: Jul 30 14:42:04 ERROR http-8080-Processor18 Dispatcher.serviceAction:512 - Could not find action or result No result defined for action com.domain.location.action.LocationAction and result input - action - file:/opt/apache-tomcat-5.5.20/webapps/location/WEB-INF/classes/struts.xml:1203:37 Here is my jsp...

ICEFaces 'Content is not allowed in prolog' Error

Hello, I have an JSF/ICEFaces application that is works fine but I keep getting this error. Although the application continues normally, I still get that error now and then. As far as I understand it's complaining about having something in the file before XML header but I'm not sure why I'm getting this I'm using ICEfaces that generates...

What can I do with plist files outside of my app?

My iPhone app generates some very nice-looking plist files. I can look at them through xcode 's plist editor and through any plain text editor when I just want the xml. But can I do anything else with this data? I tried importing the xml into a spreadsheet in NeoOffice, but it just showed the plain text. All I'm asking is this: Is t...

PHP SimpleXML Group By Element Type

Ok here's my dilemma. I am looking for a way to consolidate the data in a group using SimpleXML in PHP. Here's what I mean. Let's say I have an xml that looks like this: <favorites> <interesting> <type>Movie</type> <character>James Bond</character> <name>Casino Royale</name> </interesting> <interes...

Converting a PHP array to XML?

Say I have an array like this: <?php $colors=array(); $colors[0]['id']=1; $colors[0]['color']='blue'; $colors[1]['id']=2; $colors[1]['color']='green'; ...... ?> What's the easiest way to have the entire array converted to XML? ...

Loose merge of XML documents

I've got two documents - one is a custom XML file format, the other is an RSS feed with a bunch of custom extensions. I want to fill in fields in the XML file with values found in the RSS feed when one element value matches. This is for an offline process that will be run a few times manually - it doesn't need to perform well, be all th...

In .NET, how do I write a UTF-16 XMLDocument to a string with a BOM

I am building an XmlDocument on the fly in .NET with an xml document. I then transform that with the Transform() method of an XslCompiledTransform. The Transform() method threw an exception because an invalid character for the encoding was found in the stream. When I copy/paste the string with the help of the TextVisualizer in Visual St...

WebLogic XML External Entity Resolution: Is there another way besides using the XML Registry?

We have an application that uses SiteMesh, and when WebLogic tries to parse the TLD files, it sees the DOCTYPE specification, containing the reference to the TLD DTD, at "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd". The server can not initiate outbound connections to the Internet, and so cannot retrieve the DTD, which causes the ...

DOCTYPE's role in general XML

I know the purpose of DOCTYPE (and what each url/identifier on the line is) as far as web standards and page validation goes, but I am unsure about what it actually "is" in the context of an XML document. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dt...

ROME API to Parse RSS/ATOM

Hey folks. Trying to parse rss/atom feeds with the ROME library. Need some help. I am new to java so I am not in tune with many of it's intricacies. 2 things. Does ROME automatically use it's modules to handle different feeds as it comes across them, or do I have to ask it to use them. If so, any direction on this. How do I get to ...

Castor Collection Field to empty

My castor masrshaller have an XML output as below root> field1 /field1> field2 /field2> .......... fieldn> collection> field> field> .......... field> /collection> /root> my mapping for the collection part is field name="collectionObj" type="string" collection="arraylist"> bind-xml name="...

How do you handle the fetchxml result data?

I have avoided working with fetchxml as I have been unsure the best way to handle the result data after calling crmService.Fetch(fetchXml). In a couple of situations, I have used an XDocument with LINQ to retrieve the data from this data structure, such as: XDocument resultset = XDocument.Parse(_service.Fetch(fetchXml)); if (resultset.R...

CSS generated content in IE8 in .NET

I'm using the WebBrowser control in a C# application to render an XML document (initially loaded from a file, but then modified programmatically) styled with CSS. I've upgraded to IE8 and confirmed that the WebBrowser control is using IE8, but my user:before and user:after rules with content are not having any effect. The plain user rule...

How do I encode UTF-8 using the XStream framework?

Per XStream's FAQ its default parser does not preserve UTF-8 document encoding, and one must provide their own encoder. How does one do this? Thanks! ...

PHP and XML: The cost of parsing a large XML file every page request.

What is the cost of parsing a large XML file using PHP on every page request? I would like to implement custom tags in HTML. <?xml version="1.0"?> <html> <head> <title>The Title</title> </head> <body> <textbox name="txtUsername" /> </body> </html> After I load this XML file in PHP, I search for the cus...

UTF8 encoded text cones in a TDesC8 variable from Xml-parser in Symbian

Hi! I'm using Carbide.c++ 2.0 to create a S60 application that consumes my own webservice. I've used the Yahoo! Image Search example as a starting point and data is shipped back and forth nicely. Problems occur when there are non-english characters in the reply so the text presented to the user in the listbox is incorrect. The XML-docume...

xml parsing in iPhone... question about getting other tags with same names

Let me try to explain as clear as possible what I mean exactly with this question. let's say we use this example http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html and the xml looks instead of like this <Books> <Book id="1"> <title>Circumference</title> <author>Nicholas Nicastro</author> <summary>Eratosthenes and the A...

javascript error while reading xml file in ie

I am facing problem for reading xml file using javascript. It works fine in other browser but in it its throw the following error. Microsoft JScript runtime error: 'null' is null or not an object My code snippet is as below. GDownloadUrl("<?php echo $cfg->webroot;?>/G-map/map_xml/<?php echo $_SESSION['xml_file_name'];?>", fun...