Search Results

Search found 29159 results on 1167 pages for 'xml configuration'.

Page 1/1167 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • XML Schema: Namespace issues when importing shared elements

    - by netzwerg
    When trying to import shared definitions from a XML Schema, I can properly reference shared types, but referencing shared elements causes validation errors. This is the schema that imports the shared definitions (example.xsd): <?xml version="1.0" encoding="UTF-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:shared="http://shared.com"> <xs:import namespace="http://shared.com" schemaLocation="shared.xsd"/> <xs:element name="example"> <xs:complexType> <xs:sequence> <xs:element ref="importedElement"/> <xs:element ref="importedType"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="importedElement"> <xs:complexType> <xs:sequence> <xs:element ref="shared:fooElement"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="importedType"> <xs:complexType> <xs:sequence> <xs:element name="bar" type="shared:barType"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> These are the shared definitions (shared.xsd): <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://shared.com" targetNamespace="http://shared.com"> <xs:element name="fooElement"> <xs:simpleType> <xs:restriction base="xs:integer"/> </xs:simpleType> </xs:element> <xs:simpleType name="barType"> <xs:restriction base="xs:integer"/> </xs:simpleType> </xs:schema> Now consider this XML instance: <?xml version="1.0"?> <example xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="example.xsd"> <importedElement> <fooElement>42</fooElement> </importedElement> <importedType> <bar>42</bar> </importedType> </example> When validated, the "importedType" works perfectly fine, but the "importedElement" gives the following error: Invalid content was found starting with element 'fooElement'. One of '{"http://shared.com":fooElement}' is expected I would guess that my troubles are related to namespace issues (hence the somehow misleading "got fooElement but was expecting fooElement") -- any hints on what's wrong here?

    Read the article

  • Configuration Files: how to read them into models?

    - by stacker
    I have a lot of configuration files in this format: <?xml version="1.0" encoding="utf-8"?> <XConfiguration> <XFile Name="file name 1" /> <XFile Name="name2" /> <XFile Name="name3" /> <XFile Name="name4" /> </XConfiguration> I want to use ConfigurationRepository.Get to get this object populated: public class XConfiguration { public XFile[] Files { get; set; } } I wonder what is the best way to do that. LinqToXml? I don't think ConfigurationManager is a smart option for this.

    Read the article

  • Alternative for namespaces in xml

    - by mridul4c
    I have a web-service which gives a xml feed for number of clients of us, our clients consumes the xml in different types of devices. In our XML we have some namespaces also. But one of our clients can't detect namespaces because of some limitation at their end. But I can't provide a new xml for him as well. Please suggest me something so that I can satisfy the needs of namespaces without using that, so that i can change my xml to be usable by all of them. Thanks in advance.

    Read the article

  • Use XQuery to Access XML in Emacs

    - by Gregory Burd
    There you are working on a multi-MB/GB/TB XML document or set of documents, you want to be able to quickly query the content but you don't want to load the XML into a full-blown XML database, the time spent setting things up is simply too expensive. Why not combine a great open source editor, Emacs, and a great XML XQuery engine, Berkeley DB XML? That is exactly what Donnie Cameron did. Give it a try.

    Read the article

  • Validating an XML document fragment against XML schema

    - by shylent
    Terribly sorry if I've failed to find a duplicate of this question. I have a certain document with a well-defined document structure. I am expressing that structure through an XML schema. That data structure is operated upon by a RESTful service, so various nodes and combinations of nodes (not the whole document, but fragments of it) are exposed as "resources". Naturally, I am doing my own validation of the actual data, but it makes sense to validate the incoming/outgoing data against the schema as well (before the fine-grained validation of the data). What I don't quite grasp is how to validate document fragments given the schema definition. Let me illustrate: Imagine, the example document structure is: <doc-root> <el name="foo"/> <el name="bar"/> </doc-root> Rather a trivial data structure. The schema goes something like this: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="doc-root"> <xsd:complexType> <xsd:sequence> <xsd:element name="el" type="myCustomType" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="myCustomType"> <xsd:attribute name="name" use="required" /> </xsd:complexType> </xsd:schema> Now, imagine, I've just received a PUT request to update an 'el' object. Naturally, I would receive not the full document or not any xml, starting with 'doc-root' at its root, but the 'el' element itself. I would very much like to validate it against the existing schema then, but just running it through a validating parser wouldn't work, since it will expect a 'doc-root' at the root. So, again, the question is, - how can one validate a document fragment against an existing schema, or, perhaps, how can a schema be written to allow such an approach. Hope it made sense.

    Read the article

  • JBoss AS: use .xml files in the properties-service.xml

    - by fgysin
    The properties service (configured in properties-service.xml) in JBoss application server lets you specify external .properties files that are loaded and can then be accessed as system properties from the deployed applications. (See here http://community.jboss.org/wiki/PropertiesService for more info...) Is it also possible to load config files in the .xml format instead of .properties? I know it is possible for certain given configs like for example the mail-service.xml and the jboss-log4j.xml... But they are both loaded directly by JBoss, and not via the properties service.

    Read the article

  • gwt+xml- can i read through incomplete XML using the GWT XML Parser

    - by Arvind
    I have a requirement where a user is typing in XML in a text area, and I want to show the various nodes in a tree...But as the user is typing in the xml, it wont be a complete xml (since he is still typing in the XML)... How do I read an incomplete XML and correctly generate the tree? I understand how to read an xml and generate nodes in the tree, what I want to know is, how to read the incomplete XML as it is being typed in

    Read the article

  • Why isn't the Spring AOP XML schema properly loaded when Tomcat loads & reads beans.xml

    - by chrisbunney
    I'm trying to use Spring's Schema Based AOP Support in Eclipse and am getting errors when trying to load the configuration in Tomcat. There are no errors in Eclipse and auto-complete works correctly for the aop namespace, however when I try to load the project into eclipse I get this error: 09:17:59,515 WARN XmlBeanDefinitionReader:47 - Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/aop/spring-aop-2.5.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not . Followed by: SEVERE: StandardWrapper.Throwable org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 39 in XML document from /WEB-INF/beans.xml is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:config'. Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'aop:config'. Based on this, it seems the schema is not being read when Tomcat parses the beans.xml file, leading to the <aop:config> element not being recognised. My beans.xml file is as follows: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <!--import resource="classpath:META-INF/cxf/cxf.xml" /--> <!--import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /--> <!--import resource="classpath:META-INF/cxf/cxf-servlet.xml" /--> <!-- NOTE: endpointName attribute maps to wsdl:port@name & should be the same as the portName attribute in the @WebService annotation on the IWebServiceImpl class --> <!-- NOTE: serviceName attribute maps to wsdl:service@name & should be the same as the serviceName attribute in the @WebService annotation on the ASDIWebServiceImpl class --> <!-- NOTE: address attribute is the actual URL of the web service (relative to web app location) --> <jaxws:endpoint xmlns:tns="http://iwebservices.ourdomain/" id="iwebservices" implementor="ourdomain.iwebservices.IWebServiceImpl" endpointName="tns:IWebServiceImplPort" serviceName="tns:IWebService" address="/I" wsdlLocation="wsdl/I.wsdl"> <!-- To have CXF auto-generate WSDL on the fly, comment out the above wsdl attribute --> <jaxws:features> <bean class="org.apache.cxf.feature.LoggingFeature" /> </jaxws:features> </jaxws:endpoint> <aop:config> <aop:aspect id="myAspect" ref="aBean"> </aop:aspect> </aop:config> </beans> The <aop:config> element in my beans.xml file is copy-pasted from the Spring website to try and remove any possible source of error Can anyone shed any light on why this error is occurring and what I can do to fix it?

    Read the article

  • Create an XML file using Datasets Using info from XML Schema

    - by Voulnet
    Hello there, I have been thinking about the optimal way to create an XML file using data from a Dataset AND according to the rules of an XML schema. I've been searching around for a bit, and I failed to find a way in which I only take the data from the Dataset and put it inside a XML tags, with the tags being defined by an already-existing schema. So it might go like this: 1- Create Dataset and fill its rows with data. 2- Create an XML according to an XML schema rules. 3- Fill said XML file with data from Dataset such that data is taken from the Dataset while structure of the XML file is taken from the XML schema.

    Read the article

  • XML Serialization in C# without XML attribute nodes

    - by Alex Marshall
    Hello, I have an XML document format from a legacy system that I have to support in a future application. I want to be able to both serialize and deserialize the XML between XML and C# objects, however, using the objects generated by xsd.exe, the C# serialization includes the xmlns:xsi..., xsi:... etc XML attributes on the root element of the document that gets generated. Is there anyway to disable this so that absolutely no XML attribute nodes get put out in the resulting XML ? The XML document should be elements only. Duplicate? XmlSerializer: remove unnecessary xsi and xsd namespaces

    Read the article

  • <?xml version=“1.0” encoding=“UTF-8”?> not <?xml version='1.0' encoding='UTF-8'?>

    - by user2446702
    I am using lxml with tree.write(xmlFileOut, pretty_print = True, xml_declaration = True, encoding='UTF-8' to write out my opened and edited xml file, but I absolutely need to have the xml declaration as <?xml version=“1.0” encoding=“UTF-8”?> and NOT <?xml version='1.0' encoding='UTF-8'?> Now I know they are exactly the same when it comes to xml, but I am dealing with a very tricky customer who absolutely has to have " in the declaration and not '. I have searched everywhere but can't find the answer. Could I create it and add it in myself to the head of the xml somehow? Could I tell lxml that this is what I need as an xml declaration?

    Read the article

  • How to handle updated configuration when it's already been cloned for editing

    - by alexrussell
    Really sorry about the title that probably doesn't make much sense. Hopefully I can explain myself better here as it's something that's kinda bugged me for ages, and is now becoming a pressing concern as I write a bit of software with configuration. Most software comes with default configuration options stored in the app itself, and then there's a configuration file (let's say) that a user can edit. Once created/edited for the first time, subsequent updates to the application can not (easily) modify this configuration file for fear of clobbering the user's own changes to the default configuration. So my question is, if my application adds a new configurable parameter, what's the best way to aid discoverability of the setting and allow the user (developer) to override it as nicely as possible given the following constraints: I actually don't have a canonical default config in the application per se, it's more of a 'cascading filesystem'-like affair - the config template is stored in default/config.json and when the user wishes to edit the configuration, it's copied to user/config.json. If a user config is found it is used - there is no automatic overriding of a subset of keys, the whole new file is used and that's that. If there's no user config the default config is used. When a user wishes to edit the config they run a command to 'generate' it for them (which simply copies the config.json file from the default to the user directory). There is no UI for the configuration options as it's not appropriate to the userbase (think of my software as a library or something, the users are developers, the config is done in the user/config.json file). Due to my software being library-like there's no simple way to, on updating of the software, run some tasks automatically (so any ideas of look at the current config, compare to template config, add ing missing keys) aren't appropriate. The only solution I can think of right now is to say "there's a new config setting X" in release notes, but this doesn't seem ideal to me. If you want any more information let me know. The above specifics are not actually 100% true to my situation, but they represent the problem equally well with lower complexity. If you do want specifics, however, I can explain the exact setup. Further clarification of the type of configuration I mean: think of the Atom code editor. There appears to be a default 'template' config file somewhere, but as soon as a configuration option is edited ~/.atom/config.cson is generated and the setting goes in there. From now on is Atom is updated and gets a new configuration key, this file cannot be overwritten by Atom without a lot of effort to ensure that the addition/modification of the key does not clobber. In Atom's case, because there is a GUI for editing settings, they can get away with just adding the UI for the new setting into the UI to aid 'discoverability' of the new setting. I don't have that luxury. Clarification of my constraints and what I'm actually looking for: The software I'm writing is actually a package for a larger system. This larger system is what provides the configuration, and the way it works is kinda fixed - I just do a config('some.key') kinda call and it knows to look to see if the user has a config clone and if so use it, otherwise use the default config which is part of my package. Now, while I could make my application edit the user's configuration files (there is a convention about where they're stored), it's generally not done, so I'd like to live with the constraints of the system I'm using if possible. And it's not just about discoverability either, one large concern is that the addition of a configuration key won't actually work as soon as the user has their own copy of the original template. Adding the key to the template won't make a difference as that file is never read. As such, I think this is actually quite a big flaw in the design of the configuration cascading system and thus needs to be taken up with my upstream. So, thinking about it, based on my constraints, I don't think there's going to be a good solution save for either editing the user's configuration or using a new config file every time there are updates to the default configuration. Even the release notes idea from above isn't doable as, if the user does not follow the advice, suddenly I have a config key with no value (user-defined or default). So the new question is this: what is the general way to solve the problem of having a default configuration in template config files and allowing a user to make user-specific version of these in order to override the defaults? A per-key cascade (rather than per-file cascade) where the user only specifies their overrides? In this case, what happens if a configuration value is an array - do we replace or append to the default (or, more realistically, how does the user specify whether they wish to replace or append to)? It seems like configuration is kinda hard, so how is it solved in the wild?

    Read the article

  • Who is Configuration Manager?

    - by altern
    I would like to ask members of the community about the role of Configuration Manager, as you see it. I'm not asking what Configuration Management is, as long it had been asked before. What I need to know is: What tasks do you think Configuration Manager should perform (or performs) in your team? What is primary responsibility of Configuration Manager? What are secondary/auxiliary responsibilities of Configuration Manager? Does Configuration Manager need to be in charge of development processes on the project/company or he should be told what to do? What are relations between Configuration Manager, Build Manager, Release Manager, Deployment Engineer, CI Engineer roles? Aren't they all the same - Configuration Management? Maybe term Configuration Management is redundant and Technical/Team Lead should do all the related work instead? It would be really great if you could share your vision and experience.

    Read the article

  • Using VTD-XML to modify element text only

    - by Algorist
    Hi, I want to achieve below thing in vtd-xml xml modifier class. Original xml <xml> <element attr1='1' attr2='2' attr3='3'>text</element> </xml> int p = vn.getText() xm.updateToken(p, "new text"); But the code here is not modifying the text to new text. Any idea how to achieve this? Other option is to call xm.remove() and then add tag. But, I am not able to retain the attributes. Thank you Bala

    Read the article

  • Wrapping Arbitrary XML within XML

    - by Marc C
    I need to embed arbitrary (syntactically valid) XML documents within a wrapper XML document. The embedded documents are to be regarded as mere text, they do not need to be parseable when parsing the wrapper document. I know about the "CDATA trick", but I can't use that if the inner XML document itself contains a CDATA segment, and I need to be able to embed any valid XML document. Any advice on accomplishing this--or working around the CDATA limitation--would be appreciated.

    Read the article

  • XML Parsing from Non-XML Document

    - by Neel Basu
    in a xml/non-xml File there may exist some XML Block that I need to parse and replace with some other string.. The Scenario is something like this.. Some Text <cnt:use name="abc" call="xyz"> <cnt:param name="x" value="2" /> </cnt:use> Some Text There is no guarantee that the document is a proper XML document. (there may exist some unclosed Tags. or some other common mistakes that a Stupid people can make while typing HTML). so I can't use SAX or DOM. I can't even pass it to XSLT (am I right ?). So Whats the best way to extract the <cnt:*> part from the non-xml Document. and read it then replace with something else.

    Read the article

  • How to transport an XML fragment in an XML Document

    - by mrwayne
    Hi, I'm using an AJAX system on a web application, and for one of the objects i return, it needs to contain an xml fragment. Unfortunately, being AJAX, i'm sending the values back via XML already. So, at the moment, i have something that looks like this (ignoring the fact the tags arent perfect. <Transport> <Message> <Content><[CDATA...] XML Content in here </Cdata></Content> </Message> </Transport> This has worked pretty well for the last few years, however, now the XML content itself needs to contain its own CDATA tags and its causing me grief because you cannot nest CDATA sections. Is there another way to encode the 'XML Content' internally?

    Read the article

  • Programatically determining which node in an XML document caused validation against its XML Schema t

    - by jd1212
    My input is a well-formed XML document and a corresponding XML Schema document. What I would like to do is determine the location within the XML document that causes it to fail validation against the XML Schema document. I could not figure out how to do this using the standard validation approach in Java: SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Schema schema = schemaFactory.newSchema(... /* the .xsd source */); Validator validator = schema.newValidator(); DocumentBuilderFactory ... DocumentBuilder ... Document document = DocumentBuilder.parse(... /* the .xml source */); try { validator.validate(new DOMSource(document)); ... } catch (SAXParseException e) { ... } I have toyed with the idea of getting at least the line and column number from SAXParseException, but they're always set to -1, -1 on validation error.

    Read the article

  • Free lightweight XML text editor to include with an application

    - by Heinzi
    Our application uses a XML configuation file. I thought that it would be nice to distribute some small, lightweight XML editor with our application that the user can use to edit the config file. Features should be: Small and lightweight (ideally, a small .exe that does not require installation), free, with license terms that permit distributing it with a commercial application, understands XML schemas (auto-completion, show validation errors). Does anyone know of such an editor?

    Read the article

  • Is using something other than XML advisable for my configuration file?

    - by Earlz
    I have a small tool I'm designing which would require a configuration file of some sort. The configuration file in my case is really more of a database, but it needs to be lightweight, and if needed the end-user should find it easily editable. However, it also will contain a lot of things in it. (depending on certain factors, could be 1Mb or more) I've decided I'd rather use plain ol' text, rather than trying to use SQLite or some such. However, with using text, I also have to deal with the variety of formats. So far, my options are XML JSON Custom format The data in my file is quite simple consisting for the most part of key-value type things. So, a custom format wouldn't be that difficult... but I'd rather not have to worry about writing the support for it. I've never seen JSON used for configuration files. And XML would bloat the file size substantially I think. (I also just has a dislike of XML in general). What should I do in this case? Factors to consider: This configuration file can be uploaded to a web service(so size matters) Users must be able to edit it by hand if necessary(ease of editing and reading matters) Must be able to generate and process automatically (speed doesn't matter a lot, but not excessively slow) The "keys" and "values" are plain strings, but must be escaped because they can contain anything. (unicode and escaping has to work easily)

    Read the article

  • Store XML,update record in XML,retrive a specific record in XML stored on BB device

    - by user469999
    I am writing a blackberry application where i want to store the data returned by a web service in my BB device.Earlier i was going to use SQLite for storing the data in mobile but as i googled and also did programming using SQLite and found that some BB devices dont support SQLite library and fail to create the database.Then i decided to keep the data returned by webservice in a XML format on my BB device. I just want to know is there any method or way in blackberry through which i can parse the data stored in xml,update it,or directly access a particular record stored in the xml instead of traversing the whole xml n times and finding the matched record. Please guide me as i am new to storing data in BB device.Is the approach which i am thinking to store data in XML right or shall i use something else Thanks in advance Yogesh Chaudhari

    Read the article

  • Linq to XML - update/alter the nodes of an XML Document

    - by knox
    Hello! If got 2 Questions: 1. I've sarted working around with Linq to XML and i'm wondering if it is possible to change a XML document via Linq. I mean, is there someting like XDocument xmlDoc = XDocument.Load("sample.xml"); update item in xmlDoc.Descendants("item") where (int)item .Attribute("id") == id ... 2. I already know how to create and add a new XMLElement by simply using xmlDoc.Element("items").Add(new XElement(......); but how can i remove a single entry. XML sample data: <items> <item id="1" name="sample1" info="sample1 info" web="" /> <item id="2" name="sample2" info="sample2 info" web="" /> </itmes>

    Read the article

  • Expose DB2 data as XML / Query DB2via XML

    - by Anthony Gatlin
    I have a client who has a sort of data warehouse stored in DB2. For a variety of reasons, the data must remain on this platform. The client is considering implementing an open-source CMS (Drupal) which runs in MySQL. The client needs to be able to execute a bunch of pre-defined queries against the DB2 database from the remote application. Drupal appears to interact well with XML data from other systems. It was suggested that we use something like XML-RPC to execute the queries against DB2. I am very familiar with SQL Server and pretty familiar with MySQL, but I have no experience with DB2 and no understanding of its capabilities or limitations. Is there any way that we can use something like XML, XML-RPC, or even http to initiate queries against a DB2 database? Any ideas are appreciated! Thank you!

    Read the article

  • Update XML element with LINQ to XML in VB.NET

    - by Bayonian
    Hi, I'm trying to update an element in the XML document below: Here's the code: Dim xmldoc As XDocument = XDocument.Load(theXMLSource1) Dim ql As XElement = (From ls In xmldoc.Elements("LabService") _ Where CType(ls.Element("ServiceType"), String).Equals("Scan") _ Select ls.Element("Price")).FirstOrDefault ql.SetValue("23") xmldoc.Save(theXMLSource1) Here's the XML file: <?xml version="1.0" encoding="utf-8"?> <!--Test XML with LINQ to XML--> <LabSerivceInfo> <LabService> <ServiceType>Copy</ServiceType> <Price>1</Price> </LabService> <LabService> <ServiceType>PrintBlackAndWhite</ServiceType> <Price>2</Price> </LabService> </LabSerivceInfo> But, I got this error message: Object reference not set to an instance of an object. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Error line:ql.SetValue("23") Can you show me what the problem is? Thank you.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >