When designing an XML structure I sometimes find myself wanting to use similar patterns across multiple element types that appear in the same instance document.
For example, the Head-Body pattern can often be useful if you want to keep data and meta data (data about the data) separate, and sometimes it makes sense for multiple types of ...
So, I wish to parse an xml schema and list all the elements along with their annotation and type. I looked at some java possibilities - the closest was XSOM. It seems like driving a truck trailer to get some milk from the neighborhood store.
I looked at JAXB, but there's no parse and list all elements against schemata.
I don't want to ...
I am reading XML files of Office 2007 document using xquery. In these files the namespaces are also included. I need to retrieve the node of namespaces. I wrote xquery to fetch data and it works fine if I removed namespace from the source XML file else of the xquery resultset is empty. Wanna know how can I read namespaces and value from ...
Hello All,
We are struggling with some namespace compatibility issues. Currently we store some external data in our database as XML files with namespace as xmlns="http://xyz.com/prodresponse/v2", recently the vendor has changed the namesspace to xmlns="http://xyz.com/prodresponse/v4".
The issue is we need to deal with both old and new ...
I work with an application that uses a large set of xml interfaces for integration and data import / export. We use JAXB to map from those interfaces to our domain object model. One challenge we frequently face is how to deal with the need to change to the these interfaces during the course of a project in the face of new requirements.
...
In one of my projects I use JAXB2 marshaller, having a contract-first web service I generate the objects from a XML Schema.
Everything works just fine. But, I have a "code usability" issue. Let me give you an example.
Schema:
<xs:complexType name="personContractAlertListType">
<xs:sequence>
<xs:element ref="PersonContrac...
Hello everyone:
I have following XSD code:
<xsd:complexType name="questions">
<xsd:sequence>
<xsd:element name="location" type="location"/>
<xsd:element name="multipleChoiceInput" type="multipleChoiceInput" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="textInput" type="textInput" minOccurs="0" max...
I wrote some Java classes and annotated them with the JAXB annotations.
After that I used schemagen to generate an xsd.
Then I build an object graph and marshalled it to a xml file.
I modified the xml file so that it was not valid anymore.
I wanted to use the xsd in the hope the JAXB unmarshalling fails. But it doesn't. Why?
JAXB is ...
I can also settle for a web-based interface, but a good command-line tool is preferable. Now, I have tried to use xsd.exe that comes with mono-devel, but that skipped a whole bunch of stuff that was mentioned in the xml file.
I understand that I will need to hand-tweak the output, but I do want something decent to start with.
...
All we are using web services.
I want to send generic result from my function as a result. I can set its return type as an object type. I wonder that, can i create(generate) xml schema of my return type runtime?
for ex:
[Serializable]
class NewClass{}
[Serializable]
class OldClass{}
[WebMethod]
public object fFunctionN...
How to create a JAXB java class out of a xml schema using a utility?
I don't like reverse-engineering of several huge XSD-files to a JAXB-compliant java class.
I know there's the jdk utility schemagen - but this works the other way round.
What tool can help me?
...
SAX error if StreamSource(FileInputStream) but StreamSource(File) ok
Hi, I encountered a StreamSource issue when the parameter was FileInputStream.
When the parameter was File, it's ok.
public int initXSD (String xsdFile) {
// no error at all if File
Source schemaFile = new StreamSource(new File(xsdFile));
// sax e...
Hi,
I am trying to consume a RESTFul WCF service's Method through a POST request.
Following is Webservice's method signature
[DataContract(Namespace = "")]
public class CompositeType
{
bool boolValue = true;
string stringValue = "Hello ";
[DataMember]
public string StringValue
{
...
how can we load a schema which imports other shemas with in it in a tree view control in c#?
...
I'm trying to validate one xml that I create with a local schema, but some freak error is throwing. My code:
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
factory.setNamespaceAware(true);
SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setS...
Coming from a .NET background where you can easily generate an object model from an XML schema (through, for example xsd.exe) I wanted to know if there is a similar facility for generating Objective-C/NSObject objects.
Thanks!
...
Hi All,
Hope you all are doing well.
Previously I asked a question how to import a XML file to SQL Server thanks to all you responses.
As my source file come with heavy amount of data, I am trying to load by SSIS. Below are the steps I followed:
Imported XML by BulkLoad to a XML type column
Created XSD Schema out of that XML file in...
Is there a simple way to make Powerdesigner generate an XSD file? It generates an XSM file, but it's not the same specification. If there were a simple way of doing it, it would ease my life as heaven :P.
...
I need to extend an existing XML document with new elements without losing the ability to validate it against both the unchanged original schema and an extended schema defined by me.
For example, lets say I want to add Code and Price elements to an existing Book document, as follows:
<aa:Book xmlns:aa="http://www.aa.com"
xmlns...
Hi
I am wondering does VS 2010 have something that I can use to compare an xml document to my schema? I tried a few online tools but my xml document seems to big and my browser just crashes.
Thanks
...