Search Results

Search found 58802 results on 2353 pages for 'system xml'.

Page 116/2353 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • Is there any trick to match two XML by one XSLT?

    - by brain_pusher
    Is there any trick to match two XML by one XSLT? I mean the way I can apply XSLT to a parameter passed. For example (I missed declarations to be short). XML1: XML to be transformed: <myData> <Collection> </Collection> </myData> XSLT need to be applied to the previous XML: <xsl:param name='items' /> <xsl:template match='Collection'> <!-- some transformation here --> </xsl:template> XML2: XML data passed as the parameter 'items': <newData> <Item>1</Item> <Item>2</Item> <Item>3</Item> </newData> And I need to create a set of nodes in the 'Collection' node in XML1 for each 'Item' element in XML2 using XSLT. And I do not know what XML2 contains exactly at design time. It is generated at runtime, so I can't place it inside XSLT, I know only its schema.

    Read the article

  • WCF REST Question, Binding, Configuration

    - by Ethan McGee
    I am working on a WCF rest interface using json. I have wrapped the service in a windows service to host the service but I am now having trouble getting the service to be callable. I am not sure exactly what is wrong. The basic idea is that I want to host the service on a remote server so I want the service mapped to port localhost:7600 so that it can be invoked by posting data to [server_ip]:7600. The problem is most likely in the configuration file, since I am new to WCF and Rest I wasn't really sure what to type for the configuration so sorry if it's a total mess. I removed several chunks of code and comments to make it a little easier to read. These functions should have no bearing on the service since they call only C# functions. WCF Service Code using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; using System.Text; namespace PCMiler_Connect { public class ZIP_List_Container { public string[] ZIP_List { get; set; } public string Optimized { get; set; } public string Calc_Type { get; set; } public string Cross_International_Borders { get; set; } public string Use_Kilometers { get; set; } public string Hazard_Level { get; set; } public string OK_To_Change_Destination { get; set; } } [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)] public class PCMiler_Webservice { [WebInvoke(Method = "POST", UriTemplate = "", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json), OperationContract] public List<string> Calculate_Distance(ZIP_List_Container container) { return new List<string>(){ distance.ToString(), time.ToString() }; } } } XML Config File <?xml version="1.0" encoding="utf-8"?> <configuration> <system.serviceModel> <services> <service name="PCMiler_Connect.PCMiler_Webservice"> <endpoint address="" behaviorConfiguration="jsonBehavior" binding="webHttpBinding" bindingConfiguration="" contract="PCMiler_Connect.PCMiler_Webservice" /> <host> <baseAddresses> <add baseAddress="http://localhost:7600/" /> </baseAddresses> </host> </service> </services> <behaviors> <endpointBehaviors> <behavior name="jsonBehavior"> <enableWebScript/> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> </configuration> Service Wrapper using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess; using System.ServiceModel; using System.Text; using System.Threading; namespace PCMiler_WIN_Service { public partial class Service1 : ServiceBase { ServiceHost host; public Service1() { InitializeComponent(); } protected override void OnStart(string[] args) { host = new ServiceHost(typeof(PCMiler_Connect.PCMiler_Webservice)); Thread thread = new Thread(new ThreadStart(host.Open)); } protected override void OnStop() { if (host != null) { host.Close(); host = null; } } } }

    Read the article

  • How to achieve conditional resource import in a Spring XML context?

    - by Boris Terzic
    What I would like to achieve is the ability to "dynamically" (i.e. based on a property defined in a configuration file) enable/disable the importing of a child Spring XML context. I imagine something like: <import condition="some.property.name" resource="some-context.xml"/> Where the property is resolved (to a boolean) and when true the context is imported, otherwise it isn't. Some of my research so far: Writing a custom NamespaceHandler (and related classes) so I can register my own custom element in my own namespace. For example: <myns:import condition="some.property.name" resource="some-context.xml"/> The problem with this approach is that I do not want to replicate the entire resource importing logic from Spring and it isn't obvious to me what I need to delegate to to do this. Overriding DefaultBeanDefinitionDocumentReader to extend the behaviour of the "import" element parsing and interpretation (which happens there in the importBeanDefinitionResource method). However I'm not sure where I can register this extension.

    Read the article

  • Can I can configure cxf to use a specific XML parser?

    - by CJS
    Is there a way to specify which XML parser cxf uses? Either through the cfx.xml file or programmatically? Our app has the Woodstox parser on its classpath, and cxf seems to be using that by default. However, the Woodstox implementation seems to truncate large Base64 encoded byte arrays in the SOAP packet. Removing Woodstox from the classpath eliminates this truncation problem, but that's not an option right now since other parts of our app also depends on Woodstox. It would be ideal if I could simply tell cxf to use another XML parser. Is this possible?

    Read the article

  • How to read XML from the internet using a Web Proxy?

    - by Mark Allison
    This is a follow-up to this question: How to load XML into a DataTable? I want to read an XML file on the internet into a DataTable. The XML file is here: http://rates.fxcm.com/RatesXML If I do: public DataTable GetCurrentFxPrices(string url) { WebProxy wp = new WebProxy("http://mywebproxy:8080", true); wp.Credentials = CredentialCache.DefaultCredentials; WebClient wc = new WebClient(); wc.Proxy = wp; MemoryStream ms = new MemoryStream(wc.DownloadData(url)); DataSet ds = new DataSet("fxPrices"); ds.ReadXml(ms); DataTable dt = ds.Tables["Rate"]; return dt; } It works fine. I'm struggling with how to use the default proxy set in Internet Explorer. I don't want to hard-code the proxy. I also want the code to work if no proxy is specified in Internet Explorer.

    Read the article

  • In SQL Server can I insert multiple nodes into XML from a table?

    - by tpower
    I want to generate some XML in a stored procedure based on data in a table. The following insert allows me to add many nodes but they have to be hard-coded or use variables (sql:variable): SET @MyXml.modify(' insert <myNode> {sql:variable("@MyVariable")} </myNode> into (/root[1]) ') So I could loop through each record in my table, put the values I need into variables and execute the above statement. But is there a way I can do this by just combining with a select statement and avoiding the loop? Edit I have used SELECT FOR XML to do similar stuff before but I always find it hard to read when working with a hierarchy of data from multiple tables. I was hoping there would be something using the modify where the XML generated is more explicit and more controllable.

    Read the article

  • How to export more than 1MB in XML format using sqlcmd and without an input file?

    - by jon
    Hello, In SQL Server 2008, I want to export the result of a stored procedure to a file using sqlcmd utility. Now the end of my stored procedure is a select statement with a "for xml path.." clause at the end. I read on BOL that if I don't want my output truncated when reaching 1MB file size, I have to use this :XML ON command, but it should be placed on its own line, before calling the stored procedure. Does any of you experts know if it is possible to do that without specifying an input file for sqlcmd? (I'm calling sqlcmd like this: exec master..xp_cmdshell 'sqlcmd -Q"exec storedProcedureName @param1=value1, @param2=value2" -o c:\exportResults.xml -h-1 -E', but "storedProcedureName" and its parameters can change, which would mean 1 input file per passed parameters to sqlcmd) Also, it seems that I can't use bcp instead of sqlcmd because my stored procedure is creating a temporary table and performing DML statements on it? Thanks a lot

    Read the article

  • Python.expat can't parse XML file with bad symbols. How to go around?

    - by culebrón
    I'm trying to parse an XML file with expat, and here's the line where I get bad token exception: <tag k="name" v="???????????????????????????????????????????????????????????????????" /> xml.parsers.expat.ExpatError: not well-formed (invalid token): line 610127, column 37 The symbols in hex look like: \xd1? Seems like someone wrote this string (Russian alfabet) hitting backspace a few times. I set parser.returns_unicode = True, but this didn't help. The 1st line is <?xml version="1.0" encoding="UTF-8"?>. I work with a bz2 file. (bz2.BZ2File) How can I parse the file?

    Read the article

  • How can I get a value from an xml key/value pair with xpath in my xslt?

    - by TahoeWolverine
    I have some xml that I want to process using xslt. A good amount of the data comes through in key value pairs (see below). I am struggling with how to extract the value base on the key into a variable. I would like to be able to do something like this: <xsl:variable name="foo" select="/root/entry[key = 'foo']/value"/> but that doesn't seem to work. Here is sample xml. <?xml version="1.0" encoding="ISO-8859-1"?> <root> <entry> <key> foo </key> <value> bar </value> </entry> </root> What would the correct xpath be for this?

    Read the article

  • trying to parse an xml from a url and it wont work.

    - by ida
    this page shown an xml file and im trying to use simplexml to parse the data out and print it. what am i missing? cause all it does is show a blank page when i run it. <?php $url = "http://api.scribd.com/api?method=docs.getList&api_key=2apz5npsqin3cjlbj0s6m"; $xml = new SimpleXMLElement($url,NULL,true); foreach($xml -> result as $value) { echo $value->doc_id."<br/>"; echo $value->access_key."<br/>"; echo $value->secret_password."<br/>"; echo $value->title."<br/>"; } ?>

    Read the article

  • How to parse strings representing xml.dom.minidom nodes in python?

    - by Francis Davey
    I have a collection of nodes xml.dom.Node objects created using xml.dom.minidom. I store them (individually) in a database by converting them to a string using the toxml() method of a the Node object. The problem is that I'd sometimes like to be able to convert them back to the appropriate Node object using a parser of some kind. As far as I can see the various libraries shipped with python use Expat which won't parse a string like '' or indeed anything which is not a correct xml string. So, does anyone have any ideas? I realise I could pickle the nodes in some way and then unpickle them, but that feels unpleasant and I'd much rather be storing in a form I can read for maintenance purposes. Surely there is something that will do this?

    Read the article

  • linq to xml. read. and assign to ViewData..noob

    - by raklos
    I have some xml similar to this: <?xml version="1.0" encoding="utf-8" ?> <data> <resources> <resource key="Title">Alpha</resource> <resource key="ImageName">Small.png</resource> <resource key="Desc">blah</resource> </resources> </data> using linq-xml how can i assign each resource here as a key value pair with the ViewData collection. Thanks.

    Read the article

  • How to ignore comments when reading a XML file into a XmlDocument?

    - by tunnuz
    Possible duplicate: How to remove all comment tags from XmlDocument Hello, I am trying to read a XML document with C#, I am doing it this way: XmlDocument myData = new XmlDocument(); myData.Load("datafile.xml"); anyway, I sometimes get comments when reading XmlNode.ChildNodes. For the benefit of who's experiencing the same requirement, here's how I did it at the end: /** Validate a file, return a XmlDocument, exclude comments */ private XmlDocument LoadAndValidate( String fileName ) { // Create XML reader settings XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreComments = true; // Exclude comments settings.ProhibitDtd = false; settings.ValidationType = ValidationType.DTD; // Validation // Create reader based on settings XmlReader reader = XmlReader.Create(fileName, settings); try { // Will throw exception if document is invalid XmlDocument document = new XmlDocument(); document.Load(reader); return document; } catch (XmlSchemaException) { return null; } } Thank you Tommaso

    Read the article

  • Replace a word in an XML file through StreamReader in XNA?

    - by kcoppock
    Okay, so this is sort of a hack...but it may have to be. I'm writing an app in XNA, which from my research into this problem apparently doesn't support XML version 1.1. I'm reading in the contents of an ePub document, and one of the newer books contains its content directory as a version 1.1 XML document. This causes my program to crash. However, the structure is the same as the rest, the only thing that should be keeping it from working is the hard-coded "1.0" in the XmlDocument class. Is it possible that I could read in the file from the stream, see if it contains: <?xml version="1.1" encoding="UTF-8" standalone="no"?> and simply replace it with "1.0"? Then I could pull it in as an XmlDocument. I'm not doing any writing to the file, or any complex structural reading, just looking for a few specific nodes, and pulling in the values, so I don't know what the ramifications of this would be.

    Read the article

  • How do I set the dataProvider for an <s:List> component to be an XML file?

    - by Matt Calthrop
    I've got the latest Beta of Adobe Flash Builder 4. I want to use a <s:List> component, and specify the dataProvider as being an XML file. However, after loads of research (including looking at doc links off labs.adobe.com), I still can't figure out how to do it. The XML file will look something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <imageList> <image location="path/to/file1.jpg" /> <image location="path/to/file2.jpg" /> <image location="path/to/file3.jpg" /> </imageList>

    Read the article

  • How to scan a mixed mode C++/CLI assembly to create the intellisense XML?

    - by Anzurio
    We have a C++/CLI mixed mode assembly out of which we produce an XML file that we use for both, Sandcastle documentation and Intellisense. We use a tool which scans the assembly and create all entries for us, unfortunately I don't know how this tool works and it is unable to handle method signatures like: void foo([Out] long bar); The XML file is expected this parameter to be System.Int32!CompilerServices.IsLong@ but our tool just can't handle that. In other words, how do you scan an assembly to create the XML file needed for Intellisense?

    Read the article

  • PHP: $_POST array to XML file and display results.

    - by user633264
    I'm creating a "Madlibs" page where visitors can create funny story things online. The original files are in XML format with the blanks enclosed in XML tags (Such as blablabla <PluralNoun></PluralNoun> blablabla <Verb></Verb> ). The form data is created using XSL and the results are saved using a $_POST array. How do I post the $_POST array between the matching XML tags and then display the result to the page? I'm sure it uses a "foreach" statement, but I'm just not familiar enough with PHP to figure out what functions to use. Any help would be great. Thanks, E

    Read the article

  • Location of various javax.xml.* packages within the Java 6 SDK.

    - by celestialorb
    Alright, so recently I was using Notepad++ for all of my programming needs, but I've started using Eclipse for larger-scale Java projects now. I decided to pick up an old project of mine which used various classes within the "javax.xml.*" namespaces. When I was compiling and running the program with Notepad++ it worked just fine, however Eclipse can't seem to find these packages. My question is this, since I obviously have the classes somewhere within my current installation of JDK 6 (since I had no problems when using Notepad++), where can I find the location of the .JAR file(s) that include these namespaces/classes so that I can add them to my Eclipse project? Thanks for any help you can give me! Regards, celestialorb Also, if you're curious about the specific packages I'm looking for they are: javax.xml.soap.* javax.xml.transform.* Thanks again!

    Read the article

  • What's a good way to write XML in C++?

    - by nebukadnezzar
    There are plenty of Libraries to parse XML, but it seems there aren't many good (?) ways to write XML in C++. Libraries I've been using so far: PugiXML: really lightweight, very straightforwarded API, but it seems to lack a way to write XML (Or I haven't found it yet) RapidXML: I don't have much experience with RapidXML; But it does look nice. TinyXML: I find it odd that the STL TinyXML needs to be explicitly "enabled" in TinyXML - I mean, if your compiler doesn't support the STL, get a better one! Anyway, to make my point clear, I have written a PHP Script that does what I plan to do in C++: http://codepad.org/RyhQSgcm I really appreciate any help!

    Read the article

  • How to represent a Many-To-Many relationship in XML or other simple file format?

    - by CSharperWithJava
    I have a list management appliaction that stores its data in a many-to-many relationship database. I.E. A note can be in any number of lists, and a list can have any number of notes. I also can export this data to and XML file and import it in another instance of my app for sharing lists between users. However, this is based on a legacy system where the list to note relationship was one-to-many (ideal for XML). Now a note that is in multiple lists is esentially split into two identical rows in the DB and all relation between them is lost. Question: How can I represent this many-to-many relationship in a simple, standard file format? (Preferably XML to maintain backwards compatibility)

    Read the article

  • Having trouble reading XML file from Windows server. Works on Linux

    - by DuFF14
    I'm parsing an XML file in an android app. My success varies depending upon where the file is hosted. After hosting the file on 4 different servers (2 Linux, 2 Windows), I discovered that when the xml is hosted on a Linux server, the app works. When it's hosted on a Windows server, I am unable to parse correctly. Instead of reading the expected xml tags, it reads HTML tags (, , , etc). I'm not sure why it doesn't work on Windows servers, or if that is even the issue and not just a coincidence. Any help is appreciated. Thanks. Here is my code: private void getXmlData() { HttpClient httpclient = new DefaultHttpClient(); String url = XML_URL; HttpPost httppost = new HttpPost(url); HttpResponse response = httpclient.execute(httppost); SaxParser saxParser = new SaxParser(response); parsedXML = saxParser.parse(); }

    Read the article

  • Is XML-RPC bad used as a protocol for a public API implementation?

    - by Jack Duluoz
    I need to implement a web API for a project I'm working on in this period. I read there are many standard protocols to do it: XML-RPC, SOAP, REST. Apparently, the XML-RPC one is the easiest one to implement and use from what I saw, but I didn't find anything about using it to implement an API. Instead I found many tutorial about creating a REST API in PHP, for example. Is there any counter-indication for using XML-RPC to implement a public web API? Also, more generally speaking, I could (sort of) define a custom protocol for my API, to keep things simpler (i.e. accepting only GET request containing the parameters I need): would this be so bad? Is using a standard protocol a must-do?

    Read the article

  • How do i parse the new wow RSS feed? (LINQ to XML)

    - by Sunzaru Sven
    The link i want to parse is here. I'm looking to parse it in "real time" so that as things happen i can send myself messages/tweets and what not. I plan on having each element of the XML from the feed as an item of a class/struct. I'm really looking for LINQ to XML examples, and a good book. I've seen other LINQ to XML articles out there, but i'm just not grasping how they work. Old SQL minds are hard to break perhaps... /shrug.

    Read the article

  • Does the XML specification states that parser need to convert \n\r to \n always, even when \n\r appe

    - by mic.sca
    Hi, I've stumbled in a problem handling the \line-feed and \carriage-return characters in xml. I know that, according to http://www.w3.org/TR/REC-xml/#sec-line-ends, xml processors are required to replace any "\n\r" or lone "\r" sequences with "\n". The specification states that this has to be the behaviour for handling any "external parsed entity", does this apply to CDATA sections inside of an element as well? thank you, Michele I'm sure that msxml library for example converts every \n\r" or lone "\r" sequences to "\n", regardless of their being in a cdata section or not.

    Read the article

  • Are there any XML Editors with FTP and file-tree browsing combined?

    - by JW
    Are there any (free preferably) XML Editors combined with FTP and file-tree browsing Project wide find+Replace I.e A bit like what Dreamweaver MX is but with fancier XML capabilities /XSLT /XSD Perhaps even DW does this...im still on an older version. I'd like to keep a smooth flow between find-edit-view-upload any ideas? Background: I have converted most of the html files of my legacy site into XML (which match the directory structure of my 'public docs' folder). Part of a step towards turning it into completely dynamic data via MVC /Front Controller Pattern.

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >