Search Results

Search found 17914 results on 717 pages for 'xml schema'.

Page 17/717 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Validate an XML File Against Multiple Schema Definitions

    - by Jon
    I'm trying to validate an XML file against a number of different schemas (apologies for the contrived example): a.xsd b.xsd c.xsd c.xsd in particular imports b.xsd and b.xsd imports a.xsd, using: <xs:include schemaLocation="b.xsd"/> I'm trying to do this via Xerces in the following manner: XMLSchemaFactory xmlSchemaFactory = new XMLSchemaFactory(); Schema schema = xmlSchemaFactory.newSchema(new StreamSource[] { new StreamSource(this.getClass().getResourceAsStream("a.xsd"), "a.xsd"), new StreamSource(this.getClass().getResourceAsStream("b.xsd"), "b.xsd"), new StreamSource(this.getClass().getResourceAsStream("c.xsd"), "c.xsd")}); Validator validator = schema.newValidator(); validator.validate(new StreamSource(new StringReader(xmlContent))); but this is failing to import all three of the schemas correctly resulting in cannot resolve the name 'blah' to a(n) 'group' component. I've validated this successfully using Python, but having real problems with Java 6.0 and Xerces 2.8.1. Can anybody suggest what's going wrong here, or an easier approach to validate my XML documents?

    Read the article

  • Database Schema Validation - deployable/compilable

    - by boomhauer
    Looking for a tool that will allow building database schema validation that can be compiled into a standalong tool or as a module to be used in another application. The scenario is - a client/server application that is sold to customers, and maintained through service releases. The service releases include database scripts to updated the database with any schema changes etc. However, since this is a database and the customer could either run upgrade scripts incorrectly, or tinker around and mess up something in the DB I would like to have this tool available with each release so we can verify the struture, and possibly some data, is valid. Also to have it available for remote debugging when a customer has a service ticket. Schema compare tools I've researched work great for comparing local databases, but I haven't seen something that can generate something that is deployable with our application. Thanks!

    Read the article

  • How to make schema and code dynamic?

    - by Jonarch
    I want to make my database schema and application code as dynamic as possible to handle "unknown" use cases and changes. Developing in PHP and MySQL. Twice now I have had to change my entire schema including table and column names and this means the developers have to go back to the application code and modify all the SQL queries and table/columns names. So to prevent this I want to if just like we do on pages where we have page content, title bar etc dynamic like a %variable%, can we do it for the schema and maybe even for the php code functions and classes somehow? It takes weeks to re-do all changes like this vs if it is dynamic it can be done in under a day.

    Read the article

  • Accessing inter-schema tables and relations in hibernate

    - by nitesh
    There is a typical situation being faced where different tables are scattered through different schemas in Oracle database and they are related to each other (encompassing all different types of relations). How can they be represented in Hibernate using annotations as when a sessionfactory handle is created for one schema, tables in that schema can't access other related tables (foreign key relation to tables in other schema)? For a query like following, exception is thrown - "from table1 as model where model.table2Name.table2column = "+foo Exception comes as - org.hibernate.QueryException: could not resolve property: table2column of: com.test.table1 [from com.test.table1 as model where model.table2Name.table2column = 1] Here table1 and table2 are present in different schemas.

    Read the article

  • Validate a subset of or only certain elements of an XML document?

    - by Gaurav Dadhania
    I have this XML file (some of them are HUGE - thousands of elements) and I'm trying to validate certain elements of this XML file using an XSD schema. For eg. dates, etc. Now, the problem is that XSD won't let me validate just certain sections of the document. It wants definitions for EVERYTHING - and that would be quite painful. What I would like to know is that is there a way to XSD work with only certain elements of the document? I've tried any and anyAttribute to no avail. If not, how would you do this? Is there a library/script that produces a schema corresponding to an XML document which I can then modify according to my needs? Thanks,

    Read the article

  • Linq to XML Read and output XML generated from lookup list

    - by Greg S
    I am trying to use XML created from a lookup list in SharePoint as a datasource for a treeview. It is in the form of : <NewDataSet> <test_data> <ID>1</ID> <Title>MenuItem_1</Title> <child_of /> </test_data> <test_data> <ID>2</ID> <Title>Subitem_1</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_1</child_of> </test_data> <test_data> <ID>3</ID> <Title>Subitem_2</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_1</child_of> </test_data> <test_data> <ID>4</ID> <Title>MenuItem_2</Title> <child_of /> </test_data> <test_data> <ID>5</ID> <Title>Subitem_2_1</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_2</child_of> </test_data> <test_data> <ID>6</ID> <Title>Subitem_2_2</Title> <Action>http://www.google.com</Action> <child_of>MenuItem_2</child_of> </test_data> <test_data> <ID>7</ID> <Title>Subitem_2_2_1</Title> <Action>http://www.google.com</Action> <child_of>Subitem_2_2</child_of> </test_data> </NewDataSet> There may be N tiers, but the items relate to the parent via the <child_of> element. I can't seem to figure out how to write the LINQ in C# to nest the menu items properly. A friend recommended I post here. Any help is greatly appreciated.

    Read the article

  • Is an xml sitemap good or bad [closed]

    - by Frederik Heyninck
    Possible Duplicate: Are there any clear indicators that my sitemap file is beneficial? The good: You provide search engines with all the urls in your site But, does the search engine search further than the provided urls in the xml site map? If you have a website with a forum does every post need to be in the sitemap? What if remove the sitemap afterwords, will the search engine need to start over?

    Read the article

  • Is reading xml simple in rails or converting it to hash will be simpler?

    - by Salil
    Hi All, Sorry for this question but after spending 1-2 hours on how to read xml, i thought posting it on forum will be better. So i get a complex (very large)xml response from the plugin trackify. i want to read some values form it so i covert it into hash and then read it as follows For ex:- to read city @tracking_info['TrackResponse']['Shipment']['ShipTo']['Address']['City'] #>> "SEATTLE" my question is it proper way to getting xml response or there are some xml methods which is simple to use?

    Read the article

  • writing a Simplest XML DeSerialization class for the simplest xml file. How to avoid the nesting? de

    - by Enggr
    Hi, I want to deserialize an xml file which has to be just in this form <Basket> <Fruit>Apple</Fruit> <Fruit>Orange</Fruit> <Fruit>Grapes</Fruit> </Basket> Out of the examples I read on internet the least possible format I could find was the following <Basket> <FruitArray> <Fruit>Apple</Fruit> </FruitArray> <FruitArray> <Fruit>Orange</Fruit> </FruitArray> <FruitArray> <Fruit>Grapes</Fruit> </FruitArray> </Basket> and that has the following deserialization class for converting it into a class object. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace XMLSerialization_Basket { [System.Xml.Serialization.XmlRootAttribute("Basket", Namespace = "BasketNamespace", IsNullable = false)] public class Basket { /// <remarks/> [System.Xml.Serialization.XmlElementAttribute("FruitArray")] public FruitArray[] objFruitArray; } /// <remarks/> [System.Xml.Serialization.XmlTypeAttribute(Namespace = "BasketNamespace")] public class FruitArray { /// <remarks/> private string _Fruit; public string Fruit { get { return _Fruit; } set { _Fruit = value; } } } } Can I add something like the following directly under top class private string _Fruit; public string Fruit { get { return _Fruit; } set { _Fruit = value; } } and avoid the array nesting? my goal is to deserialize an xml of following format <Basket> <Fruit>Apple</Fruit> <Fruit>Orange</Fruit> <Fruit>Grapes</Fruit> </Basket>

    Read the article

  • Sync LINQ-to-SQL DBML schema with SQL Server database

    - by Maxim Z.
    After creating a SQL Server 2008 database, I made a Linq-to-SQL schema in Visual Studio. Next, in the .dbml visual editor (in Visual Studio), I added PK-to-FK and PK-to-PK associations to the schema. How do I copy those associations that I created in Visual Studio over to the database? In other words, how do I sync with the DB?

    Read the article

  • Please Explain Drupal schema and drupal_write_record

    - by Aaron
    Hi. A few questions. 1) Where is the best place to populate a new database table when a module is first installed, enabled? I need to go and get some data from an external source and want to do it transparently when the user installs/enables my custom module. I create the schema in {mymodule}_schema(), do drupal_install_schema({tablename}); in hook_install. Then I try to populate the table in hook_enable using drupal_write_record. I confirmed the table was created, I get no errors when hook_enable executes, but when I query the new table, I get no rows back--it's empty. Here's one variation of the code I've tried: /** * Implementation of hook_schema() */ function ncbi_subsites_schema() { // we know it's MYSQL, so no need to check $schema['ncbi_subsites_sites'] = array( 'description' => 'The base table for subsites', 'fields' => array( 'site_id' => array( 'description' => 'Primary id for site', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), // end site_id 'title' => array( 'description' => 'The title of the subsite', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '', ), //end title field 'url' => array( 'description' => 'The URL of the subsite in Production', 'type' => 'varchar', 'length' => 255, 'default' => '', ), //end url field ), //end fields 'unique keys' => array( 'site_id'=> array('site_id'), 'title' => array('title'), ), //end unique keys 'primary_key' => array('site_id'), ); // end schema return $schema; } Here's hook_install: function ncbi_subsites_install() { drupal_install_schema('ncbi_subsites'); } Here's hook_enable: function ncbi_subsites_enable() { drupal_get_schema('ncbi_subsites_site'); // my helper function to get data for table (not shown) $subsites = ncbi_subsites_get_subsites(); foreach( $subsites as $name=>$attrs ) { $record = new stdClass(); $record->title = $name; $record->url = $attrs['homepage']; drupal_write_record( 'ncbi_subsites_sites', $record ); } } Can someone tell me what I'm missing?

    Read the article

  • Hotel Reservation system Database schema

    - by SpikETidE
    Hi Everyone.... I am about to develop a online hotel reservation system...using php and mysql... I have some doubts about my current database schema and the business logic to get the hotels in which rooms are free between two particular dates... Does anyone know of some kind of tutorial where i can get some idea about the hotel reservation schema and the business logics that should be used in the system...? Thanks for your suggestions....

    Read the article

  • A MySQL schema parser in Java?

    - by Richard
    Hi all, Does anyone know whether there is a java library for parsing a MySQL schema? In code I want to be able to determine the tables and fields specified in a schema. Or am I going to have to write my own? Thanks Richard.

    Read the article

  • Online Collaborative Schema Design (leverage google docs?)

    - by AK
    I'm looking for an online, collaborative schema designer. It's important that it can handle revisions (history of changes). This looks cool, and I could host it on a server - but doesn't look like it would handle multi-user: http://ondras.zarovi.cz/sql/demo/ Currently we're doing a lot of design collaboration on google docs/spreadsheets. Has anyone had any success using google spreadsheet for schema design? Even if there were just a gadget for drawing lines/connections, I might give Google Docs a shot.

    Read the article

  • XML Schema for a .NET type that inherits and implements

    - by John Ruiz
    Hi, Please consider the following three .NET types: I have an interface, an abstract class, and a concrete class. My question is how to write the XML Schema to include the properties from the interface and from the abstract class. public interface IStartable { bool RequiresKey { get; set; } void Start(object key); } public abstract class Vehicle { uint WheelCount { get; set; } } public class Car : Vehicle, IStartable { public bool RequiresKey { get; set; } public string Make { get; set; } publilc string Model { get; set; } public Car() {} public void Start(object key) { // start car with key } } I don't know how to complete this schema: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="cars" xmlns="cars" xmlns:c="cars"> <!-- How do I get car to have vehicle's wheelcount AND IStartable's RequiresKey? --> <xs:element name="Car" type="c:Car" /> <xs:complexType name="Car"> <xs:complexContent> <xs:extension base="c:Vehicle"> <xs:group ref=c:CarGroup" /> </xs:extension> </xs:complexContent> </xs:complexType> <xs:group name="CarGroup"> <xs:sequence> <xs:element name="Make" type="xs:token" /> <xs:element name="Model" type="xs:token" /> </xs:sequence> </xs:group> <xs:complexType name="Vehicle"> <xs:sequence> <xs:element name="WheelCount" type="xs:unsignedInt" /> </xs:sequence> </xs:complexType> <xs:complexType name="IStartable"> <xs:sequence> <xs:element name="RequiresKey" type="xs:boolean" /> </xs:sequence> </xs:complexType> </xs:schema>

    Read the article

  • Firebird database schema/data difference tool

    - by dthrasher
    RedGate makes a tool for Microsoft SQL Server that allows you to snapshot the difference between two databases. It generates the scripts needed to update the database schema while preserving the data. I need to find a tool like this for the Firebird database. We use Firebird in an embedded fashion, and would like to push out schema updates to remote machines with as little hassle as possible.

    Read the article

  • Generating db schema from c# class

    - by Niran
    Hi, Is there any other method than nHibernate by wich we can generate db schema from class definition? My classes arn't that complex etc (few one-to-many relations). However I would like to just be able to save my objects in db and recreate schema if needed. I am stuck with .NET 2.0. I am not that particular about performance for this project, I am just lazy to create tables and write save/load code and deel with nHibernate xml. Thanks

    Read the article

  • Displaying XML data using XSLT transformations in an ASP.Net site

    - by nikolaosk
    In this post, I will try to show you how to display xml data in asp.net website after making some xslt transformations. You will need to know a few things about XSLT. The best place to find out about XSLT is this link . I am going to explain a few things about XSLT elements and functions in this post, anyway. You will see the namespaces we are going to use and some of the main classes and methods.All these come with the FCL (Framework class library) and we just have to know what they do. We will...(read more)

    Read the article

  • 2D Tile Map for Platformer, XML or SQLite?

    - by Stephen Tierney
    I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough control and flexibility with level design. I'm doing some research into whether to store level data in an XML file or in a database like SQLite. Which would be the best for this situation? Do either have any drawbacks (performance etc) compared to the other?

    Read the article

  • PHP API to trade products from eshop through REST/xml

    - by Donatas Veikutis
    I need algorithm, or PHP api example, or existing decision how to make system for trade big information for B2B xml with goods information. Now I try to use Slim framework to do that system. But for me need some documentation what architecture have to be in here. System requiments is simple: User have autentification username and password Then he can see which product groups assigned to it Then he can see all product with information (price, title, description, images, specifications etc.). Its will the easiest way to get a free php api for that I think, and try too edit some code. But I did not found anything.

    Read the article

  • How to use the same element name in different purposes ( in XML and DTD ) ?

    - by BugKiller
    Hi, I Want to create a DTD schema for this xml document: <root> <student> <name> <firstname>S1</firstname> <lastname>S2</lastname> </name> </student> <course> <name>CS101</name> </course> </root> as you can see , the element name in the course contains plain text ,but the element name in the student is complex type ( first-name, last-name ). The following is the DTD: <!ELEMENT root (course|student)*> <!ELEMENT student (name)> <!ELEMENT name (lastname|firstname)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT course (name)> When I want to validate it , I get an error because the course's name has different structure then the student's name . My Question: how can I make a work-around solution for this situation without changing the name of element name using DTD not xml schema . Thanks.

    Read the article

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