xml

Unicode error with Solr, any idea?

I have an index that takes textual description and places it in the index. I build XML object to pass them on to Solr where indexing is done. Now when I search in chinese text, I get back question marks for the indexed text whose XML was fine. Any idea where the problem could be? Thanks ...

How to configure subsonic 3 with xml?

How to configure subsonic 3 with xml? ...

how can I replace the deprecated SoapFormatter?

I have a legacy app that uses SoapFormatter to persist a graph of objects (maybe 50 different classes). I want to move away from using this as it is deprecated, and increasingly hard to continue to support deserializing from old files as the classes change. I want to use DataContractSerializer going forward. Does anyone have any suggest...

INSERT Xml into SQL Server 2008 database

Hello I'm trying to insert some XML data into a table on SQL Server 2008. However I keep getting thrown this error; XML parsing: line 1, character 39, unable to switch the encoding The database column filemeta uses the XML datatype, and I've switch the encoding to UTF-16 which I believe is necessary for adding XML data. INSERT IN...

Extract Normal Form from XML

<Historic> -----<ReturnData Year="2010"> ----- -----<ReturnHistory> ----- -----<Return StoreDate="2010-07-31" Type="1"> ----- -----<EndDate>2010-01-31</EndDate> ----- -----<ReturnDetail TimePeriod="1"> ----- ----- -----<Value>2.83</Value> -...

Writing an RSS reader in Java

I'm trying to write a basic RSS reader for a class project. Our book shows an example by walking the DOM tree. Is that a decent approach for an RSS reader? Would I just ignore certain tags that are of uninterest to me and not to be used by the RSS Reader? Thanks. ...

How to store and extract XML information from an nvarchar(max) type column, and use it in joins?

Hi, I have a column of type 'nvarchar(max)' that should now hold XML information instead of just a string. Say: col1 has value 'abc' Now it has values, with additional info: <el1>abc</el2> <el2>someotherinfo</el2> Storing the information to the column is fine, since it can still be pushed in as a string. However, extracting the same...

Getting single node from xml document c#

I'm trying to get channel element from this document. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/...

Parsing an XML with Xpath in PHP

Consider the following code : $dom = new DOMDocument(); $dom->loadXML($file); $xmlPath = new DOMXPath($dom); $arrNodes = $xmlPath->query('*/item'); foreach($arrNodes as $item){ //missing code } The $file is an xml and each item has a title and a description. How can I display them (title and description)? $file = "<item> <title>t...

Restrict the depth of nested elements in XSD

Is it possible with XML schema to restrict the depth of child elements nested in a parent? The context here is I collect alarms from a management system and I want to provide a XML document which allows the end user define some rules in order to filter the alarms into folders in the UI. I want to restrict the depth of nested folders to ...

php parse xml string

Hi there , i have a string with xml data in it. how do i parse it in php? thank you ...

Parsing <first_name>João</first_name> with xml-simple

I am using the xml-simple gem inside a rake task to parse the contents of a db dump. The problem is that the database xml file contains characters like those in the title that causes xml-simple to crash. Is there a work around to this? ...

Transformer's transform causes a fatal error, why?

I've built a document using JAXP like this: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element rootElement = document.createElement("Root"); for (MyObject o : myCollection) { Element entry = document.create...

Move certain child nodes down to a new grandchild level

Hi. I've found other questions on moving nodes upwards into the parent but I'm missing the trick to move them down into a newly created node. Given: <Villain> <Name>Dr Evil</Name> <Age>49</Age> <Like>Money</Like> <Like>Sharks</Like> <Like>Lasers</Like> </Villain> I'm trying to transform this with XSLT to: <Villain> <Nam...

How to omit XML element in C# XML generated from XSD?

Minoccurs is 0 in the XSD and nillable is true for an element. But if I don't set the element value, it takes it as null and the record is blanked out on the server. Is there a way to tell it to omit the element from the output XML when some conditions are satisfied but have it for other cases? <xs:element name='CLS_CD' minOccurs='0'...

C++ XLST tranform not working using MSXML 3.0

Hi guys, I'm new to C++ and inherited the following code that is supposed to transform the given XML using the XSLT file to just spit out the text values. It loads both the XML and XSLT fine and the transformnode() call returns success but no transformation has been applied. The original output at the bottom contains the original XML i...

Problem with posting xml data to .net webservice asmx

I have the following code which is trying to post xml constructed data to webservice .asmx but xml constructed data is not reaching webservice file at all.when i make ajax call control is not moving to webservice file at all.Is their any problem with syntax in ajax. This is my code on client side . $.ajax({ type: "POST"...

log4j and XML content

I am using log4j to log request/response XMLs sent by my application. The problem is that the xml contents are getting logged with newlines. Any suggestions as to how to format so as to preserve the xml structure as it is received?? Following is my appender: <appender name="xmlFileAppender" class="org.apache.log4j.RollingFileAppender...

python parsing xml

hi i have xml file whitch i want to parse, it looks something like this <?xml version="1.0" encoding="utf-8"?> <SHOP xmlns="http://www.w3.org/1999/xhtml" xmlns:php="http://php.net/xsl"&gt; <SHOPITEM> <ID>2332</ID> ... </SHOPITEM> <SHOPITEM> <ID>4433</ID> ... </SHOPITEM> </SHOP> my parsin...

Any good books\tutorial on XML-based APIs, REST, SOAP with using Python ?

Could you all please suggest me a good books\tutorial on XML-based APIs, REST, SOAP with using Python Thanks in advance ...