Search Results

Search found 18472 results on 739 pages for 'vtd xml author'.

Page 19/739 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing

    - by Oppositional
    Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML? Note: The solution needs to handle XML data sources that use character encodings other than UTF-8, e.g. by specifying the character encoding at the XML document declaration. Not mangling the character encoding of the source while stripping invalid hexadecimal characters has been a major sticking point. The removal of invalid hexadecimal characters should only remove hexadecimal encoded values, as you can often find href values in data that happens to contains a string that would be a string match for a hexadecimal character. Background: I need to consume an XML-based data source that conforms to a specific format (think Atom or RSS feeds), but want to be able to consume data sources that have been published which contain invalid hexadecimal characters per the XML specification. In .NET if you have a Stream that represents the XML data source, and then attempt to parse it using an XmlReader and/or XPathDocument, an exception is raised due to the inclusion of invalid hexadecimal characters in the XML data. My current attempt to resolve this issue is to parse the Stream as a string and use a regular expression to remove and/or replace the invalid hexadecimal characters, but I am looking for a more performant solution.

    Read the article

  • xml declaration not being omitted from page

    - by Mark Schultheiss
    I have an XSLT transform I am using to process an XML file, inserting it into the body of my aspx page. Reference the following for background information: background on xml/xslt I have the following in my xml file: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:myCustomStrings="urn:customStrings"> <xsl:output method="xml" version="2.0" media-type="text/html" omit-xml-declaration="yes" indent="yes" />...unrelated stuff left out here Here is the output that is relevent: <div id="example" /> <?xml version="1.0" encoding="utf-8"?><div xmlns:myCustomStrings="urn:customStrings"><div id="imFormBody" class="imFormBody"> My question relates to the output, specifically to the <?xml version="1.0" encoding="utf-8"?> which is getting included in the output anyway. Is the issue related to the custom method I have used? If so, I don't really see the need to include the xml part as the namespace is in the div tag. Is there a way to ensure that this extra stuff gets left out as I asked it to?

    Read the article

  • XML problem in the basic menu example

    - by arakn0
    Hi there, I am trying to create an app with some menus, an I am following the basic example available in the official android site: http://developer.android.com/guide/topics/ui/menus.html My problems appear when I define the menu in the XML. After creating the folder res/menu and creating the menu_option.xml file from eclipse.... The project (in general) gives an error that can be read from the Problems tab: Unparsed aapt error(s)! Check the console for output Android Packaging Problem So, changing to the Console tab to get more information about the problem, this can be read: [2010-06-02 11:35:54 - TestAudio] Error in an XML file: aborting build. [2010-06-02 11:35:54 - TestAudio] W/ResourceType(11566): Bad XML block: header size 63327 or total size -144759824 is larger than data size 0 [2010-06-02 11:35:54 - TestAudio] /home/User/workspace/TestAudio/res/menu/options_menu.xml:1: error: Error parsing XML: no element found The strange thing is that eclipse recognizes the menu items that I've defined in the XML,I can reference them in the code with no problems and my main activity builds. (and the rest of the files too). Could it be that when eclipse creates a file, for some reason, the Android SDK has problems to read it, or something similar?? The XML code is exactly the same as the one in the example, so I don't really know what is happening. The code in options_menu.xml is this: <menu xmlns:android="http://schemas.android.com/apk/res/android" <item android:id="@+id/new_game" android:title="New Game" / <item android:id="@+id/quit" android:title="Quit" / </menu Thanks in advance for your help!

    Read the article

  • JavaScript snippet to read and output XML file on page load?

    - by Banderdash
    Hey guys, hoping I might get some help. Have XML file here of a list of books each with unique id and numeral value for whether they are checked out or not. I need a JavaScript snippet that requests the XML file after the page loads and displays the content of the XML file. XML file looks like this: <?xml version="1.0" encoding="UTF-8" ?> <response> <library name="My Library"> <book id="1" checked-out="1"> <authors> <author>John Resig</author> </authors> <title>Pro JavaScript Techniques (Pro)</title> <isbn-10>1590597273</isbn-10> </book> <book id="2" checked-out="0"> <authors> <author>Erich Gamma</author> <author>Richard Helm</author> <author>Ralph Johnson</author> <author>John M. Vlissides</author> </authors> <title>Design Patterns: Elements of Reusable Object-Oriented Software</title> <isbn-10>0201633612</isbn-10> </book> ... </library> </response> Would LOVE any and all help!

    Read the article

  • jQuery XML loading and then innerfade effect

    - by Ryan Max
    Hello, I think I can explain myself without code, so for brevity's sake here we go: I am using jquery to pull data from an xml and put it into a ul on the page with each xml entry as a li. This is working great! However, what I am trying to do afterwards is use the innerfade plugin to make a simple animation between each of the li's. It's not working though, as it is still just loading the static list with each item visible (whereas if innerfade was working it would only display the first....then fade into the second, etc) It's not an innerfade problem however, because if I add the list in manually to the page (not injecting it with jquery) then the innerfade works fine. I'm relatively new to DOM scripting, so I think I am missing something here. I'm not quite sure how jQuery sequences everything, and I'm having trouble phrasing my question in a search engine friendly manner so here I am. Is it possible to have jquery pull the data from xml, then inject it into the page, then have innerfade work it's magic? Or am I thinking about this the wrong way? xml code: $.ajax({ type: "GET", url: "xml/playlist.xml", dataType: "xml", success: function(xml) { $(xml).find('song').each(function(){ var name = $(this).attr('title'); var date = $(this).attr('artist'); var message = $(this).attr('path'); $('<li></li>').html('<span id="an_name">'+name+'</span><span id="an_date">'+date+'</span><span id="an_message">'+message+'</span>').appendTo('#anniversary'); }); } }); innerfade code: <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready( function(){ jQuery('#anniversary').innerfade({ speed: 1000, timeout: 5000, type: 'sequence', }); });

    Read the article

  • ListView Parsing Persian xml

    - by Namikaze Minato
    I used a tutorial about listview parsing xm from internet and using LasyAdapter shows the items in listview. When I add persian characters in xml (into one of childnodes) the result is some boxes in listview (after showing the text in listview). The format of xml is UTF-8, too. I used typeface too (but didn't work). Besides when I type Pwesian into the application it shows alright but it can't show Persiann content parsed from xml. Thanks in advance. I updated the post with original XMLparser (which was the problem). public String getXmlFromUrl(String url) { String xml = null; try { // defaultHttpClient DefaultHttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost(url); HttpResponse httpResponse = httpClient.execute(httpPost); HttpEntity httpEntity = httpResponse.getEntity(); xml = EntityUtils.toString(httpEntity); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } // return XML return xml; } public Document getDomElement(String xml) { Document doc = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { DocumentBuilder db = dbf.newDocumentBuilder(); InputSource is = new InputSource(); is.setCharacterStream(new StringReader(xml)); doc = db.parse(is); } catch (ParserConfigurationException e) { Log.e("Error: ", e.getMessage()); return null; } catch (SAXException e) { Log.e("Error: ", e.getMessage()); return null; } catch (IOException e) { Log.e("Error: ", e.getMessage()); return null; } return doc; }

    Read the article

  • What's the best way to retrieve two pieces of data from an XML file?

    - by Morinar
    I've got an XML document that is in either a pre or post FO transformed state that I need to extract some information from. In the pre-case, I need to pull out two tags that represent the pageWidth and pageHeight and in the post case I need to extract the page-height and page-width parameters from a specific tag (I forget which one it is off the top of my head). What I'm looking for is an efficient/easily maintainable way to grab these two elements. I'd like to only read the document a single time fetching the two things I need. I initially started writing something that would use BufferedReader + FileReader, but then I'm doing string searching and it gets messy when the tags span multiple lines. I then looked at the DOMParser, which seems like it would be ideal, but I don't want to have to read the entire file into memory if I could help it as the files could potentially be large and the tags I'm looking for will nearly always be close to the top of the file. I then looked into SAXParser, but that seems like a big pile of complicated overkill for what I'm trying to accomplish. Anybody have any advice? Or simple implementations that would accomplish my goal? Thanks.

    Read the article

  • Groovy and XML: Not able to insert processing instruction

    - by rhellem
    Scenario Need to update some attributes in an existing XML-file. The file contains a XSL processing instruction, so when the XML is parsed and updated I need to add the instruction before writing it to a file again. Problem is - whatever I do - I'm not able to insert the processing instruction Based on the Java-example found at rgagnon.com I have created the code below Example code ## import groovy.xml.* def xml = '''|<something> | <Settings> | </Settings> |</something>'''.stripMargin() def document = DOMBuilder.parse( new StringReader( xml ) ) def pi = document.createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="Bp8DefaultView.xsl"'); document.insertBefore(pi, document.documentElement) println document.documentElement Creates output <?xml version="1.0" encoding="UTF-8"?> <something> <Settings> </Settings> </something> What I want <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="Bp8DefaultView.xsl"?> <something> <Settings> </Settings> </something>

    Read the article

  • Storing data in XML or MongoDB

    - by user766473
    Here is my usecase. 1.Have some data, which I am storing now in the xml files. The data that I am storing is not persistent i.e I would be deleting the user data once the user logs out. 2.My server communicates with the client using the XML requests and responses. So initially we decided, since we are sending the XML as response, lets store it in XML so that conversion from database to XML format time is saved. 3.Client will request for XML based on some filter conditions. So will have to use XQUERY. 4.Maximum of 100 entries will be there in an XML, atleast as of now. Now I would like to hear some advice on whether I should use XML or mongodb. My Concerns : 1. How good is it to store temporary data in mongodb and delete/take backup once done with session 2. Conversion from mongodb json format to XML. 3. Handling the changes in the schema design. Cant use any other DB than mongodb. As some persistent operation or still done on mongodb. Thanks in advance.

    Read the article

  • How to prevent creation of monitors.xml?

    - by user222723
    I'm using Ubuntu on a tablet and have a problem with the screen rotation, which I can fix by removing ~/.config/monitors.xml, but sadly every time I rotate the screen a new monitors.xml is created. Is there any way to prevent this? I already tried to create an empty file with the same name as root but it was still overwritten after rotating the screen. Edit: I think I finally found the reason for the problem. Everytime the orientation is changed the new orientation is saved in monitors.xml while the original monitors.xml is saved as monitors.xml.backup. By playing around with chattr I found out that this causes Ubuntu to try to restore monitors.xml out of monitors.xml.backup after every login. So if I turn the screen to the left and then back to normal monitors.xml says "orientation=normal" and monitors.xml.backup says "orientation=left". After the login Ubuntu overwrites monitors.xml with the backup and uses its configuration and turns the screen to the left.

    Read the article

  • How do I add a namespace attribute to an element in JAXB when marshalling?

    - by Ryan Elkins
    I'm working with eBay's LMS (Large Merchant Services) and kept running into the error: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize. After alot of trial and error I traced the problem down. It turns out this works: <?xml version="1.0" encoding="UTF-8"?> <BulkDataExchangeRequests xmlns="urn:ebay:apis:eBLBaseComponents"> <Header> <Version>583</Version> <SiteID>0</SiteID> </Header> <AddFixedPriceItemRequest xmlns="urn:ebay:apis:eBLBaseComponents"> while this (what I've been sending) doesn't: <?xml version="1.0" encoding="UTF-8"?> <BulkDataExchangeRequests xmlns="urn:ebay:apis:eBLBaseComponents"> <Header> <Version>583</Version> <SiteID>0</SiteID> </Header> <AddFixedPriceItemRequest> The difference is the xml namespace attribute on the AddFixedPriceItemRequest . All of my XML is currently being marshalled via JAXB and I'm not sure what is the best way to go about adding a second xmlns attribute to a different element in my file. So that's the question. How do I add an xmlns attribute to another element in JAXB? UPDATE: package ebay.apis.eblbasecomponents; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "AddFixedPriceItemRequestType", propOrder = { "item" }) public class AddFixedPriceItemRequestType extends AbstractRequestType { @XmlElement(name = "Item") protected ItemType item; public ItemType getItem() { return item; } public void setItem(ItemType value) { this.item = value; } } Added class definition by request. UPDATE 2: Edited the above class like so to no effect: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(namespace = "urn:ebay:apis:eBLBaseComponents", name = "AddFixedPriceItemRequestType", propOrder = { "item" }) public class AddFixedPriceItemRequestType UPDATE 3: Here is a snippet of the BulkDataExchangeRequestsType class. I tried throwing a namespace="urn:ebay:apis:eBLBaseComponents" into the @XmlElement for AddFixedPriceItemRequest but it didn't do anything. @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BulkDataExchangeRequestsType", propOrder = { "header", "addFixedPriceItemRequest" }) public class BulkDataExchangeRequestsType { @XmlElement(name = "Header") protected MerchantDataRequestHeaderType header; @XmlElement(name = "AddFixedPriceItemRequest") protected List<AddFixedPriceItemRequestType> addFixedPriceItemRequest; UPDATE 4: Here's the hideous chunk of code that is updating the xml after marshalling for me. This is currently working although I'm not particulary proud of it. DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.newDocument(); marshaller.marshal(request, doc); NodeList nodes = doc.getChildNodes(); nodes = nodes.item(0).getChildNodes(); for(int i = 0; i < nodes.getLength(); i++){ Node node = nodes.item(i); if (!node.getNodeName().equals("Header")){ ((Element)node).setAttribute("xmlns", "urn:ebay:apis:eBLBaseComponents"); } } Update 5: For anyone else that runs into this problem with eBay and wonders why - The reasoning behind this most likely has to do with how eBay is handling these requests. The BulkDataExchange probably takes the XML payload, breaks it up, and send the pieces out to the Merchant or Trading API. The inner pieces of the payload then do not have the namespace and the get the error. This is a guess on my part but I wouldn't be surprised if this is what was going on behind the scenes. Thanks for all the help everyone.

    Read the article

  • Invoke a SOAP method with namespace prefixes

    - by mvladic
    My C# web service client sends following soap message to Java-based web service: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <getData> <request> <requestParameters xmlns="http://b..."> <equals> ... </equals> </requestParameters> </request> </getData> </soap:Body> </soap:Envelope> and Java-based web service returns error: 500 Internal Server Error ... Cannot find dispatch method for {}getData ... Client written in Java, which works, sends the following message: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <ns2:getData xmlns:ns2="http://a..."> <ns2:request> <ns3:requestParameters xmlns:ns3="http://b..."> <ns3:equals> ... </ns3:equals> </ns3:requestParameters> </ns2:request> </ns2:getData> </soap:Body> </soap:Envelope> Is there an easy way in C# to send SOAP messages the same way Java client sends: with namespace prefixes? Following is C# code that sends message: // class MyService is auto-generated using wsdl.exe tool MyService service = new MyService(); RequestMessage request = new RequestMessage(); ... ResponseMessage response = service.getData(request); ... UPDATE: RequestMessage class looks like this: /// <remarks/> [System.CodeDom.Compiler.GeneratedCodeAttribute("svcutil", "3.0.4506.2152")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://uri.etsi.org/02657/v1.5.1#/RetainedData")] public partial class RequestMessage { private byte[] requestPriorityField; private RequestConstraints requestParametersField; private string deliveryPointHIBField; private string maxHitsField; private NationalRequestParameters nationalRequestParametersField; private System.Xml.XmlElement anyField; /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(DataType="hexBinary", Order=0)] public byte[] requestPriority { get { return this.requestPriorityField; } set { this.requestPriorityField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=1)] public RequestConstraints requestParameters { get { return this.requestParametersField; } set { this.requestParametersField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=2)] public string deliveryPointHIB { get { return this.deliveryPointHIBField; } set { this.deliveryPointHIBField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(DataType="integer", Order=3)] public string maxHits { get { return this.maxHitsField; } set { this.maxHitsField = value; } } /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(Order=4)] public NationalRequestParameters nationalRequestParameters { get { return this.nationalRequestParametersField; } set { this.nationalRequestParametersField = value; } } /// <remarks/> [System.Xml.Serialization.XmlAnyElementAttribute(Order=5)] public System.Xml.XmlElement Any { get { return this.anyField; } set { this.anyField = value; } } }

    Read the article

  • XML url link in Flash

    - by Vickyboy
    Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more). My XML: <?xml version="1.0" encoding="utf-8"?> <banstead targ="_self" href="http://www.marca.com"> </banstead> My AS: weblinkXML = new XML(); weblinkXML.ignoreWhite = true; weblinkXML.load("xml/counties.xml"); weblinkXML.onLoad = function (success) { var url = weblinkXML.firstChild.attributes.href; banstead.onRelease = function () { getURL(weblinkXML.url); } } For some reason when I test the movie and click on the button it doesn´t open the URL I requested. Appreciate any help

    Read the article

  • noob question : reading xml from url link by using php

    - by mireille raad
    Hello, I am trying to build an authentication plugin that uses php/xml. My application can communicate to another application by sending this : http://tst.example.net/remote/validate_user.jhtml?ticket=$ticket_value in return i get a formatted xml document. i want to be able to parse that document. I googled and read a bit around here , but what i could find is that using php_simplexml i can do the following $xml = simplexml_load_file("test.xml"); echo $xml-getName() . ""; foreach($xml-children() as $child) { echo $child-getName() . ": " . $child . ""; } my question is : i don't have a test.xml file, it is a url that i am reading/parsing, any way how to get the info from the url, not a file. I know this is a very noobish question, i would appreciate the help

    Read the article

  • What does this web.xml error mean?

    - by jacekn
    <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"> Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..." The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml. In details, I see a bunch of these: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than xs:appinfo and xs:documentation. Saw 'var _U="undefined";'

    Read the article

  • System.XML or Regex.Replace?

    - by cam
    I'm generating a large amount of XML documents from a set of values in an Excel file. The only thing that changes for each XML document is the values. I figured the best way to generate these documents was to make a "XML skeleton" (since the XML format never changes) and then plug in symbols like "&%blahNameblahTest", so then I could just preform a Regex.Replace on each value. I will be handing over this project to another developer and I'm wondering if I should convert the project to generate the XML file manually everytime through the System.XML namespace. The only advantages I see to this is ensuring that the XML document is valid. The current method would be more readable than that method, and way faster since I'm generating around 1500 documents.

    Read the article

  • Parsing mutiple xml files in android

    - by cppdev
    Hi, I ma writing an application where I have to parse multiple xml files as a response from a server. Till now, I have written different xml parser classes for each xml depepending on the tags present in different xmls ? Can I combine all xml parser classes and write a single xml parser that handles all different tags in different xmls ? Will it work ? Will combining xml parser classes add an overhead because xml parser will check for every tag irrespective of whether that is part of file or not ? Please help.

    Read the article

  • XML testing in Rails - Fixed attributes order in Builder::XmlMarkup in ruby -

    - by Daniel Cukier
    I have the following test in my Rails Application: it "should validate xml" do builder = Builder::XmlMarkup.new builder.server(:name => "myServer", :ip => "192.168.1.1").should == "<server name=\"myServer\" ip=\"192.168.1.1\"/>" end The problem is that this test passes sometimes, because the order of the xml tag attributes is unpredictable. Is there a way to force this order? Is there any other easy way to build xml? This example is simplified, I have a big XML. My problem is that I want to do an integration test, which compares a WebService call with a fixed XML file. Otherwise, I would have to parse the xml and verify element by element in the XML.

    Read the article

  • Browser Not Reading Entire XML File

    - by Chris
    I have an XML file that is written by a PHP script. The data for the XML file is gathered from several different RSS feeds. The PHP script is invoked every 5 minutes by a Cron Job. The PHP Script takes maybe 5-10 seconds to write the XML File. Here's the problem: After the XML file is written, I can open it through DreamWeaver and read everything just fine - but when I enter the XML File's URL into my Web Browser (IE or Firefox), I get a "XML Parsing Error: not well-formed" Error in the Browser. When I do View Source in the Browser, the XML file appears incomplete - but when I open the file directly off the server, it is complete. Anyone know what's going on here?

    Read the article

  • XML and .NET: How to replace specific node with many other ones loaded from raw xml data

    - by Entrase
    Let's suppose we have an element like this one in the main xml file: <group name="gr1" filename="groups/gr1.xml"/>. The second file gr1.xml contains something like this: <item name="i1">Item one</item> <item name="i2">Item two</item> <item name="i3">Item three</item> Note that there is no XML declaration in gr1.xml, just plain items without single parent node. So… Which is the best way to replace <group/> with its <item/>s? I have already tried some things like manual enclosing of gr1.xml content into a single node with XML declaration and loading it into XmlDocument, but it doesn't look like a good solution.

    Read the article

  • XSLT: How to get XML

    - by Jyotsna Sonawane
    I have a XSL that transforms one format of XML into another. In input XML I have a node with following value - which is actually a XML string if we replace &lt; with < (less than) for e.g. &lt;Paragraph&gt;&lt;Title&gt;&lt;!CDATA[Pour les nuits du 2012-10-01 - 2012-10-30]]&gt;&lt;/Title&gt;&lt;Text&gt;&lt;![CDATA[TAXES INCLUSES.]]&gt;&lt;/Text&gt;&lt;/Paragraph&gt; I want to have the content of otherInfo as a XML node in output XML. if I do , I do not get it as a XML node - it is output just as text. How can I make XSL output the content of otherInfo as XML node ?

    Read the article

  • bash script to find/grep particular string in xml files in particular folders

    - by user3702188
    i have a problem at work, where i need to simplify the process how i searrh for logs. I would like to ask for help from experts here. We have different services for every channel. The structure is following: - root/channel_1/service_1/2014-05-21/file_54544654541.xml - root/channel_1/server2_2/2014-05-20/file_74272172.xml - root/channel_1/service_3/2014-05-22/file_45456546.xml - root/channel_2/service_4/2014-05-23/file_78754456.xml - root/channel_2/service_5/2014-05-24/file_546546546.xml my main problem is to find particular string in these xml files. Lets say, i know the channel name but i dont know the service name under which my particular string should be present. Also i know the date. So in search i want to enter the channel name the date and string. The search would be going via all service folders and looking for string only in all xml files under particular date folder and particular channel. any ideas for quickest and easiest solution to achieve this? Either by bash or perl? Any help would be appreciated thanks

    Read the article

  • There is an error in XML document... When calling to web service

    - by Sigurjón Guðbergsson
    I have created a web service and a function in it that should return a list of 11thousand records retreived from a pervasive database Here is my function in the web service. [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] public class BBI : System.Web.Services.WebService { [WebMethod] public List<myObject> getAll() { List<myObject> result = new List<myObject>(); PsqlConnection conn = new PsqlConnection("Host=soemthing;Port=something;Database=something;Encoding=IBM861"); conn.Open(); string strSql = "select 0, 1, 2, 3, 4, 5 from something"; PsqlCommand DBCmd = new PsqlCommand(strSql, conn); PsqlDataReader myDataReader; myDataReader = DBCmd.ExecuteReader(); while (myDataReader.Read()) { myObject b = new myObject(); b.0 = Convert.ToInt32(myDataReader[0].ToString()); b.1 = myDataReader[1].ToString(); b.2 = myDataReader[2].ToString(); b.3 = myDataReader[3].ToString(); b.4 = myDataReader[4].ToString(); b.5 = myDataReader[5].ToString(); result.Add(b); } conn.Close(); myDataReader.Close(); return result; } } Then i add web reference to this web service in my client program and call the reference BBI. Then i call to the getAll function and get the error : There is an error in XML document (1, 63432). public List<BBI.myObject> getAll() { BBI.BBI bbi = new BBI.BBI(); List<BBI.myObject> allBooks = bbi.getAll().OfType<BBI.myObject>().ToList(); return allBooks; } Here is the total exception detail System.InvalidOperationException was unhandled by user code Message=There is an error in XML document (1, 71897). Source=System.Xml StackTrace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at BBI.BBI.getAllBooks() in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vefur\73db60db\a4ee31dd\App_WebReferences.jl1r8jv6.0.cs:line 252 at webServiceFuncions.getAllBooks() in c:\Documents and Settings\forritari\Desktop\Vefur - Nýr\BBI\trunk\Vefur\App_Code\webServiceFuncions.cs:line 59 InnerException: System.Xml.XmlException Message='', hexadecimal value 0x01, is an invalid character. Line 1, position 71897. Source=System.Xml LineNumber=1 LinePosition=71897 SourceUri="" StackTrace: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args) at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args) at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, StringBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType) at System.Xml.XmlTextReaderImpl.ParseCharRefInline(Int32 startPos, Int32& charCount, EntityType& entityType) at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars) at System.Xml.XmlTextReaderImpl.ParseText() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlTextReader.Read() at System.Xml.XmlReader.ReadElementString() at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBBI.Read2_Book(Boolean isNullable, Boolean checkType) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBBI.Read20_getAllBooksResponse() at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer35.Deserialize(XmlSerializationReader reader) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) InnerException: The database records are containing all kind of strange symbols, for example ¤rmann Kr. Einarsson and Tv” ‘fint˜ri Can someone see what im doing wrong here?

    Read the article

  • C# Windows Service XML

    - by Goober
    Scenario I have a windows service written in C# that performs some processing based on parsing an XML file and use that data to carry out various tasks. The service also does various bits of logging - which uses settings from an APP.Config file. The Problem When the service is compiled, installed and run, the XML file seems to disappear. I'm getting the impression that it is just ignored or something like that. So far I've tried using TWO App.Config files, one named App.Config that contains settings for the service, and the other called MyService.exe.config that contains all of the data that was used in the XML file (the idea being that I can parse the XML from a config file that actually gets compiled and appears in my installation directory. However When I do this, all that happens is that ONE config file appears (with the name MyService.exe.config), but it contains the contents of the App.Config file and not the XML data that I want to parse. What I need All I want is to have a config file for my settings, and an XML file for my data. Question Is this possible? I know the application works as it was originally built as a console application that ran fine. Other The application has to be designed this way (as in, I need my data stored as XML, and my settings stored in a config file). Thoughts If I could somehow combine the contents of the two files into ONE config file, that would be one way of solving the problem. However, I have tried this and of course I get a "Type Initialisation Exception", as the config file cannot interprate the XML data (probably because the tags are custom and do not form any part of the config schema - or something like that). Ideas Please could someone explain to me if it is possible for me to have an XML file AND a config file that will actually be compiled and stored in my installation directory for the service when it is run? CODE Custom XML/Data Config File <?xml version="1.0" encoding="utf-8" ?> <configuration> <servers> <SV066930> <add name="Name" value = "SV066930" /> <processes> <SimonTest1> <add name="ProcessName" value="notepad.exe" /> <add name="CommandLine" value="C:\\WINDOWS\\system32\\notepad.exe C:\\WINDOWS\\Profiles\\TA2TOF1\\Desktop\\SimonTest1.txt" /> </SimonTest1> </processes> </SV066930> </servers> </configuration> APP.Config Settings File <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx" /> </configSections> <connectionStrings> <add name="DB" connectionString="Data Source=etc......" /> </connectionStrings> </configuration> Help greatly appreciated.

    Read the article

  • Converting XML to RSS

    - by hkw
    I've got an xml feed that will be published in one location of our website, and would like to repurpose that for an RSS feed. A few different pages on the website will also be referencing the same xml - all of those transformations are set up and working. The base xml file (XMLTEST.xml) is using this structure: <POST> <item> <POST_ID>80000852</POST_ID> <POST_TITLE>title</POST_TITLE> <POST_CHANNEL>I</POST_CHANNEL> <POST_DESC>description</POST_DESC> <LINK>http://www...</LINK> <STOC>N</STOC> </item> </POST> I'm trying to transform the xml into an RSS feed using the following setup (feed.xml + rss.xsl) feed.xml: <?xml-stylesheet href="rss.xsl" type="text/xsl"?> <RSSChannels> <RSSChannel src="XMLTEST.xml"/> </RSSChannels> rss.xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" omit-xml-declaration="yes" /> <xsl:template match="RSSChannels"> <rss version="2.0"> <channel> <title>site title</title> <link></link> <description>Site description...</description> <xsl:apply-templates /> </channel> </rss> </xsl:template> <xsl:template match="RSSChannel"> <xsl:apply-templates select="document(@src)" /> </xsl:template> <xsl:template match="item"> <xsl:choose> <xsl:when test="STOC = 'Y'"></xsl:when> <xsl:when test="POST_CHANNEL = 'I'"></xsl:when> <xsl:otherwise> <item> <title> <xsl:value-of select="*[local-name()='POST_TITLE']" /> </title> <link> <xsl:value-of select="*[local-name()='LINK']" /> </link> <description> <xsl:value-of select="*[local-name()='POST_DESC']" /> </description> </item> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> When I try to view the output of feed.xml in Firefox, all of the filtering is applied correctly (sorting out items that shouldn't be published in that channel), but the page outputs as plain text, rather than the usual feed-detection that takes place in Firefox. Any ideas on what I'm missing? Thanks for any suggestions you can provide.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >