Search Results

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

Page 86/2353 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • Best practices for defining and initializing variables in web.xml and then accessing them from Java

    - by DutrowLLC
    I would like to define and initialize some variables in web.xml and the access the values of these variables inside my Java application. The reason I want to do this is because I would like to be able to change the values of these variables without having to recompile the code. What is the best practice for doing this? Most of the variables are just strings, maybe some numbers as well. Does the class that accesses the variables have to be a servlet? Thanks! Chris

    Read the article

  • Append XML string block WITH NAMESPACE REF to existing XmlDocument in .NET

    - by FT
    I have an xml document (XmlDocument) which looks like this... <stuff xmlns:n="hhtp://tempuri.com/"> </stuff> ... and a "fragment" (string) which looks like this <things> <thing n:type="info"> </thing> </things> I want to "inject" the fragment into the main document. How? (HINT: You can't use XmlDocumentFragment because the namespace 'n' isn't declared in the fragment, and the object model complains about this - throwing an 'unknown namespace' error even though the resultant document will be perfectly valid.)

    Read the article

  • Flex - How to call a webservice without crossdomain.xml file

    - by Stephane Grenier
    How can I consume a webservice that hasn't explicitely created a crossdomain.xml? I understand it's for security and to prevent cross-site scripting, but it does seem like a major limitation to the Flex framework. For example, if I want to consume a webservice, which is suppose to be language agnostic, then I can't with Flex. The webservice/server has to be specifically prepared for Flex/Flash. If it's not, then it cannot be consumed. That can't be right can it?

    Read the article

  • XmlDocument from LINQ to XML query

    - by Ben
    I am loading an XML document into an XDocument object, doing a query and then returning the data through a web service as an XmlDocument object. The code below works fine, but it just seems a bit smelly. Is there a cleaner way to take the results of the query and convert back to an XDocument or XmlDocument? XDocument xd = XDocument.Load(Server.MapPath(accountsXml)); var accounts = from x in xd.Descendants("AccountsData") where userAccounts.Contains(x.Element("ACCOUNT_REFERENCE").Value) select x; XDocument xd2 = new XDocument( new XDeclaration("1.0", "UTF-8", "yes"), new XElement("Accounts") ); foreach (var account in accounts) xd2.Element("Accounts").Add(account); return xd2.ToXmlDocument();

    Read the article

  • jquery xml select

    - by Geln
    hi, How to select items whose sub-tag key's text starts with '001'? <root> <item> <key>001001</key> <text>thanks</text> </item> <item> <key>001002</key> <text>very</text> </item> <item> <key>002001</key> <text>much</text> </item> </root> $(xml).find("item>[filter string]").each(function() { alert(this); });

    Read the article

  • JPA persistence.xml share same jar file

    - by user213855
    Hi! I'm wondering if I can share the same jar file for several persistence units.. I mean: I have two persistence units described in my persistence.xml file and the entities are not in the same JAR. Entities are in a separated JAR file but, in that one, there are entites for both persistence units. I think I red somewhere that I coould use tag something like this: externalEntities.jar#com.mycompany.EntityA so I could separate them. I tried this solution and it doesn't work. Now I guess that it couldn't be done to package all entities (for two different persistence units) in the same JAR file. What do yo think?

    Read the article

  • Convert XML file to CSV

    - by skerit
    After having converted a messed up XML using regex, I now need to change it yet again. This source file <product> <sku>SP00001</sku> <PID_OWNER_SellerID>StoreName</PID_OWNER_SellerID> <EANCode>8711983489813</EANCode> <DeliveryDays>2</DeliveryDays> </product> Has to become a CSV file, but like this: sku field value SP00001 PID_OWNER_SellerID StoreName SP00001 EANCode 8711983489813 SP00001 DeliveryDays 2 I take it this is outside of regex' scope and has to be done with XSL?

    Read the article

  • Creating GUI using XML file in C#

    - by Gal Goldman
    How can I create automatic GUI using XML file in C#? Should I write a parser for the file and define a sort of "protocol" for the file's structure, and after the parse - create the GUI controls manually (respective to the data in the files)? Or is there a better way? Is there a tool, or a built-in code in the .NET environment which can do that for me automatically? (I am currently working with win forms, but I am willing to consider any other technology - as long as it's supported in MONO, since the code should be portable to Linux as well).

    Read the article

  • database security with php page that spits out XML

    - by Rees
    Hello, I just created a PHP page that spits outs some data from my database in an XML format. This data is fetched from a flex application I made. I had spent a long time formatting my tables and database information and do not want anyone to be able to simply type www.mysite.com/page_that_spits_out_XML.php and steal my data. However, at the same time I need to be able to access this page from my flex application. Is there a way I can prevent other people from doing this? Thank you!

    Read the article

  • Import xml to database with high end performance and Audit log- A best Practice

    - by karthik
    Hi, I have to import big xml files to Ms SQL 2005 Database by using C# with high end Performance. Even if any record fails in middle, i have to take next record for process and failed record need to log for audit. I don't want to put insert query with in for loop. Could you please suggest a best way to do this. If I can use bulkcopy methods or Data Adapter update methods- Its very nice, But if any record fails, execution of that statement breaks and rolled back totally, right? Any alternatives and Best practices with example please..? Is Multi-threading works for me to improve performance..? Give me example please. Thanks Karthikeyan

    Read the article

  • Parsing a XML File and Replacing Chosen Node With Values From Text File

    - by transmogrify
    I wrote a C# Winforms program to take a XML file and load values from a text file into each occurrence of that field which the user specifies on the UI. For whatever reason, the program inserts a carriage return on any nodes which don't contain a value. For example, it will do that to <example></example> whereas it will not misbehave on something like <country>USA</country> What is causing it to do this and how can I prevent it? Here is the code from the part which handles this functionality. XmlDocument LoadXmlDoc = new XmlDocument(); StreamReader sr = File.OpenText(DataLoadTxtBx.Text); string InputFromTxtFile; LoadXmlDoc.Load(XmlPath.Text); XmlNodeList NodeToCreateOrReplace = LoadXmlDoc.GetElementsByTagName(XmlTagNameTxtBx.Text); foreach (XmlNode SelectedNode in NodeToCreateOrReplace) { if ((InputFromTxtFile = sr.ReadLine()) != null) { SelectedNode.InnerText = InputFromTxtFile; } } sr.Close(); LoadXmlDoc.Save(XmlPath.Text);

    Read the article

  • Using C# XElement to parse a XML Response

    - by Subhen
    Here is my XML Response: <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" <item id="1182" parentID="40" restricted="1"> <title>Hot Issue</title> </item> </DIDL-Lite> When I am trying to parse it using xELemnt and try assigning to a var like below: var vnyData = from xmyResponse in xResponse.Descendants("DIDL-Lite").Elements("item") select new myClass {strTitle = ((string)xmyResponse .Element("title")).Trim()}; This is not yeilding any results. Thanks, Subhendu

    Read the article

  • Linq to sql Error "Data at the root level is invalid " for nullable xml column

    - by Mukesh
    I have Created a table like CREATE TABLE [dbo].[tab1]( [Id] [int] NOT NULL, [Name] [varchar](100) NOT NULL, [Meta] [xml] NULL, CONSTRAINT [PK_tab1] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] When I am doing linq to sql query to fetch a data it throw an error "data at the root level is invalid linq". In further investigation I come to know that the meta column is null in that case. In real it is nullable Do I have to remove the nullable and set some blank root node as default or there is some another way to get rid of the error. My linq Query which throws error var obj1= (from obj in dbContext.tab1s where obj.id== 123 select obj).FirstOrDefault<Tab1>();

    Read the article

  • Parsing xml with dom4j or jdom or anyhow

    - by c0mrade
    Hello, I wanna read feed entries and I'm just stuck now. Take this for example : http://stackoverflow.com/feeds/question/2084883 lets say I wanna read all the summary node value inside each entry node in document. How do I do that? I've changed many variations of code this one is closest to what I want to achieve I think : Element entryPoint = document.getRootElement(); Element elem; for(Iterator iter = entryPoint.elements().iterator(); iter.hasNext();){ elem = (Element)iter.next(); System.out.println(elem.getName()); } It goes trough all nodes in xml file and writes their name. Now what I wanted to do next is if(elem.getName() == "entry") to get only the entry nodes, how do I get elements of the entry nodes, and how to get let say summary and its value? tnx

    Read the article

  • java xml pretty printing - preserve empty elements and white pace

    - by javamonkey79
    Basically, I am looking for a java library that will take this: <foo><bar> </bar><baz>yadda</baz></foo> And pretty print it to this: <?xml version="1.0" encoding="UTF-8"?> <foo> <bar> </bar> <baz>yadda</baz> </foo> e.g. preserving whitespace AND blank elements The closest I have got was with dom4j like so: OutputFormat format = OutputFormat.createPrettyPrint(); format.setTrimText( false ); However, this does not honor the whitespace unless the element contains other character data. I'm not opposed to writing something on my own, but I would think this has already been done, why reinvent the wheel?

    Read the article

  • how to copy attribute XML node to specified structure or array

    - by jozi
    how to copy attribute XML node to specified structure or array with one command for example public struct PossibilityJavamed { public string derv; public string dervt; public string num; public string gend; } PossibilityJavamed tmpstructnew = tmpstruct; ArrayList alstout = new ArrayList(); XmlNodeList nodeList; nodeList = docHarf.SelectNodes("//adatesmi"); for (int i = 0; i < nodeList.Count; i++) { tmpstructnew.derv = nodeList[i].Attributes["derv"].Value; tmpstructnew.dervt = nodeList[i].Attributes["dervt"].Value; tmpstructnew.num = nodeList[i].Attributes["num"].Value; tmpstructnew.gend = nodeList[i].Attributes["gend"].Value; alstout.Add(tmpstructnew); } but i will do it in one command

    Read the article

  • C# xml serializer - Unable to generate a temporary class

    - by gosom
    I am trying to serialize an xml to a class with the following way: XmlSerializer ser = new XmlSerializer(typeof(PSW5ns.PSW5)); StringReader stringReader; stringReader = new StringReader(response_xml); XmlTextReader xmlReader; xmlReader = new XmlTextReader(stringReader); PSW5ns.PSW5 obj; obj = (PSW5ns.PSW5)ser.Deserialize(xmlReader); xmlReader.Close(); stringReader.Close(); the class PSW5 is generated automatically by xsd.exe using an PSW5.xsd file given to me. I have done the same for other classes and it works. Now i get the following error (during runtime) : {"Unable to generate a temporary class (result=1).\r\nerror CS0030: Cannot convert type 'PSW5ns.TAX_INF[]' to 'PSW5ns.TAX_INF'\r\nerror CS0029: Cannot implicitly convert type 'PSW5ns.TAX_INF' to 'PSW5ns.TAX_INF[]'\r\n"} I am confused because it works for other classes the same way. I would appreciate any suggestions. Thanks inadvance, Giorgos

    Read the article

  • JQuery XML option node

    - by JD
    hi, I am having an issue with parsing XML with JQuery when there is a node with an option node <preferences><dashboard> <report id="si_pg_vw" order="0"> <header> <data> <option type="reportname" value="Page View"/> </data> </header> </report> the following code in firebug returns no children $reportElement.find("data")[0] however if I change option to any other value ("option2", "test" etc) then the line above returns one child which is correct. Am I mising something or is there a bug? Thanks John

    Read the article

  • aws-s3 can't find xml-simple, but in gem list

    - by Dan Donaldson
    I'm transitioning to heroku, and need to have AWS-s3 connections to deal with a variety of graphics. I've installed the aws-s3 gem, but one of its dependencies is not being found: xml-simple. My belief is that this is a standard part of RoR, and it is in the gem list. When I deploy to heroku, all is fine, but on my development server, it isn't being found when the code uses it to check the existence of a graphic. It works fine from the console, using s3sh. I'm not quite sure why this is -- what do I need to check? Using OS X 10.6, on a 64 bit machine -- can this be part of it?

    Read the article

  • XML format for blogs and/or CMS

    - by user288713
    I'm writing my own blog/CMS engine (using WebApp and Google App Engine), and I'm looking for a light-weight XML format to use for content storage. Is there some already existing format that could be used for this purposes? Maybe some subset of the DocBook or ePub format? I had a look at those and they seem to be a little of overkill for what I want to do. Then again WXR (Wordpress eXtended RSS) or the one from Pluxml (pluxml.org) might be suited as well. Any ideas?

    Read the article

  • XML RSS Feed Parse PHP

    - by JD
    With an XML feed like so: <w:current temperature="22.2" dewPoint="12.9" humidity="56" windSpeed="5.6" windGusts="9.3" windDirection="ESE" pressure="1017.8" rain="0.0" /> and <w:forecast day="Thursday" description="Mostly Sunny. Warm." min="17" max="29" icon="2" iconUri="http://www.weather.com.au/images/icons/2.gif" iconAlt="Mostly Sunny" /> How do I parse it in PHP using the dom? $doc = new DOMDocument(); $doc->load('http://rss.weather.com.au/sa/adelaide'); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'description' => $node->getElementsByTagName('w')->item(0)->nodeValue, ); array_push($arrFeeds, $itemRSS); } Returns error :Notice: Trying to get property of non-object in /var/www/index.php on line 123

    Read the article

  • Empty namespace using Linq Xml

    - by porum
    I'm trying to create a sitemap using Linq to Xml, but am getting an empty namespace attribute, which I would like to get rid of. e.g. XNamespace ns = "http://www.sitemaps.org/schemas/sitemap/0.9"; XDocument xdoc = new XDocument(new XDeclaration("1.0", "utf-8", "true"), new XElement(ns + "urlset", new XElement("url", new XElement("loc", "http://www.example.com/page"), new XElement("lastmod", "2008-09-14")))); The result is ... <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url xmlns=""> <loc>http://www.example.com/page</loc> <lastmod>2008-09-14</lastmod> </url> </urlset> I would rather not have the xmlns="" on the url element. I can strip it out using Replace on the final xdoc.ToString(), but is there a more correct way?

    Read the article

  • How do I convert this XML to KML?

    - by TruMan1
    I am a little new to this, but I need to convert the below XML to KML format so I can feed it into Google maps. Can anyone help with this? <messageList> <totalCount>1</totalCount> - <message> <esn>0-7396996</esn> <esnName>JOHN</esnName> <messageType>TEST</messageType> <messageDetail> ALL IS WELL AT CURRENT LOCATION.</messageDetail> <timestamp>2010-05-24T00:39:12.000Z</timestamp> <timeInGMTSecond>1274661552</timeInGMTSecond> <latitude>25.19483</latitude> <longitude>65.7162</longitude> </message> </messageList>

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >