Generate a XML with an XSD

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hi all,I'm wirting a java program and I want to export same properties to an XML File. For this file I have an XSD scheme.I tried to use a W3C DOM but I have the problem that new elements don't follow the sorting rules in the scheme. How can I connect the scheme to the DOM model that new elements will sort in that order wich is defined in the scheme?Or are there other libraries which can do this?I have had also a look in the eclips xml editor but they prohibit the access to their packages from external projects, so that i can not use their internal model.thx for all hintsMichal-- michael DOT o At gmx DOT net
0
Reply Michael 2/25/2008 10:54:42 PM

See related articles to this posting


On 26 =C6=C5=D7, 01:54, Michael Oppenauer <nos...@spam.org> wrote:

XmlBeans library.
http://xmlbeans.apache.org/

BR, Alex
0
Reply Alexander 2/26/2008 9:54:04 PM

On Mon, 25 Feb 2008 22:54:42 +0000 (UTC), Michael Oppenauer
<nospam@spam.org> wrote, quoted or indirectly quoted someone who said
:

>I'm wirting a java program and I want to export same properties to an XML 
>File. For this file I have an XSD scheme.

You can write xml files pretty easily without a schema or even a
library. The schema comes into play when you are trying to read them
and validate the data.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
0
Reply Roedy 2/28/2008 4:01:07 PM
comp.lang.java.programmer 51801 articles. 38 followers. Post

2 Replies
159 Views

Similar Articles

[PageSpeed] 1


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Parsing XSD to generate xml instances
Hello... Is it possible to parse ( or rather read) an xsd file and depending on the constraints in the xsd...develop a java code to generate xml instances confirming to the xsd ? i am working on something called "template based code generation" where in my template is an xsd file which i have to read and create xml instances confirming to the xsd . after that these xml instances would be used as data inputs to another code which will be used to generating test cases. please help! <nethunter55@gmail.com> wrote in message news:1144263616.722498.289450@j33g2000cwa.googlegrou...

sample on how to generate XML skeleton from XSD
Hello I have generated an XSD file with XMLSPY from XML file which give me all the elem structure I would like to generate the XML skeleton of this associated to this XSD file. Constraint is each elem of XSD generate <_element> <_name> </_name> <_value> </_value> </_element> eg : XSD: ==== <xs:element name="_pointList"> <xs:complexType> <xs:sequence> <xs:element ref="_entries"/> <xs:element ref="_element" maxOccurs="unbounded"/> </xs:seq...

any tools generate sample XML from XSD?
I want to ask if any tools can generate sample XML from XSD? please advise. thanks!! jrefactors@hotmail.com wrote: > I want to ask if any tools can generate sample XML from XSD? > > please advise. thanks!! > OxygenXML can do this ...

xsd (XML Schema) to c++ code generator
Hi, I am seraching for a tool("freeware") or source code which takes XML schema file(.xsd) and provide c++ code for it.Please send me the links.I have evaluated XSC(XML Schema compiler) http://www.dre.vanderbilt.edu/=AD~boris/xsc/. It do convert xsd to cpp, but it miss some informations.=20 Regards,=20 Pravin. ...

Generate xml schema (xsd) from a database schema
http://www.oracle.com/technology/tech/xml/xdk/doc/production/plsql/doc/plsql/xsu/xsu_userguide.html says XSU New Features at a Glance XSU has the following new features, offered with Oracle9i: Ability to generate the XML Schema given an SQL Query. Question: Is it possible to generate the xsd only from object relational tables or is it possible to do it from normal relational tables? For example can i generate an xsd from the scott schema. (which has ordinary relational tables) Any examples by anyone who has done this? Thanks, Sunil. ...

Dynamically generate DB structure from XML schema (XSD)
For my application I need to develop an interface with an external organisation, based on XMLHTTP messaging. Depending on the specific purpose of the communication, this external organisation will send me various XML schemas (XSD documents) specifying the structure for the message interfaces. I need to be able to interpret these XSD documents and dynamically generate my database structure based on that. But... I don't have a clue where to start. I use classic ASP with VBscript. Any tips on how to go about this? Or maybe even some example code? -- Marja Ribbers-de Vroed Marja Ribber...

Lib to generate XML/JSON[P] output from a DTD/XSD/JSON Schema/etc
Hi, I've searched both this group and the web but was unable to find an ans= wer, sorry if it has already been answered, it seems such a common problem = that I=92m sure someone has asked before. We have a WebServices platform that must reply in XML, JSON, or JSONP. Havi= ng to convert between these formats is a really pain in the neck. What I=92d like to do is, given some schema representation, that could be a= DTD, XSD or whatever and a python dictionary with the values for each node= , generate the output in either XML, JSON or JSONP. For instance, if the XSD would be: &...

[ace-users] [ANN] XSD/e
Hi, I am pleased to announce the availability of CodeSynthesis XSD/e 1.0.0. CodeSynthesis XSD/e is an open-source XML parser generator for mobile and embedded systems. It provides event-driven, stream-oriented XML parsing, XML Schema validation, and C++ data binding while maintaining a small footprint and portability. Provided with an XML instance specification (XML Schema), XSD/e generates validating C++ parser skeletons for data types defined in your vocabulary. You can then implement these parser skeletons to build your own in-memory representation or perform immediate proce...

[tao-users] [ANN] XSD/e
Hi, I am pleased to announce the availability of CodeSynthesis XSD/e 1.0.0. CodeSynthesis XSD/e is an open-source XML parser generator for mobile and embedded systems. It provides event-driven, stream-oriented XML parsing, XML Schema validation, and C++ data binding while maintaining a small footprint and portability. Provided with an XML instance specification (XML Schema), XSD/e generates validating C++ parser skeletons for data types defined in your vocabulary. You can then implement these parser skeletons to build your own in-memory representation or perform immediate proce...

[ANN] XSD/e 1.1.0
Hi, I am pleased to announce the availability of CodeSynthesis XSD/e 1.1.0. CodeSynthesis XSD/e is an open-source (GPL2 + proprietary license) XML parser generator for mobile and embedded systems. It provides event- driven, stream-oriented XML parsing, XML Schema validation, and C++ data binding while maintaining a small footprint and portability. Compared to general-purpose validating XML parsers, the XSD/e-generated parsers are 2-10 times faster while maintaining the lowest static and dynamic memory footprints. For example, a validating parser executable can be as small as 120KB in size. ...

[ANN] XSD/e 1.1.0
Hi, I am pleased to announce the availability of CodeSynthesis XSD/e 1.1.0. CodeSynthesis XSD/e is an open-source (GPL2 + proprietary license) XML parser generator for mobile and embedded systems. It provides event- driven, stream-oriented XML parsing, XML Schema validation, and C++ data binding while maintaining a small footprint and portability. Compared to general-purpose validating XML parsers, the XSD/e-generated parsers are 2-10 times faster while maintaining the lowest static and dynamic memory footprints. For example, a validating parser executable can be as small as 120KB in size. ...

Re: [ace-users] [ANN] XSD/e
--0-787576982-1175227554=:74554 Content-Type: text/plain; charset=ascii Hi, It's been a few years but I'm finally about to starting using ACE again for implementing a native XML database. Anyway, is there any new ACE frameworks that allow you to work with B-Trees using memory-mapped files and also transactions? Also, I''ve developed JNI code using ACE before and am wondering if there is any JNI/ACE utility classes out there. Thanks, Johnny Johnny Tucker Irvine, CA 92618 Phone: (949) 278-7766 --0-787576982-1175227554=:74554 Content-Type: text/html; chars...

Generate xml and to existing xml
Hi, We have the following xml that needs to be generated for 200 users. <wopi:createUser> <typ:WOUser> <typ:id> <typ:serviceProviderId>AOne</typ:serviceProviderId> <typ:companyId>Acme</typ:companyId> <typ:userId>Alice</typ:userId> </typ:id> <typ:sipAddress>sip:alice@mydomain.com</typ:sipAddress> <typ:firstName>Alice</typ:firstName> <typ:lastName>Wonderland</typ:lastName> </typ:WO...

Xml parser performance and Xml generation
Hello, I need to parse relatively small XML files (less than 100 kB) and to write XML files that can get quite big (the bigger I can get without having performance issues, the better). I looked for benchmark to help me choose beetween existing parser but didn't manage to find a suitable one. I was looking for something similar to the following one I found for python : http://effbot.org/zone/celementtree.htm#benchmarks I know benchmarks are not perfect but they could help me anyway. For example, I wonder if SimpleXML uses a lot of memory and is fast despite its simplicity. I'd also ...

convert XML to XSD? or DTD to XSD?
Can we convert XML to XSD? or DTD to XSD? Can XML SPY or other XML Editors do that? Please advise. thanks!! Matt wrote: > Can we convert XML to XSD? or DTD to XSD? Yes, here's one such service: http://www.hitsw.com/xml_utilites/ Matt wrote: > Can we convert XML to XSD? or DTD to XSD? Sure. Stylus Studio is an excellent tool for working with many XML technologies; see http://www.stylusstudio.com/ It includes cross-platform debugging for Saxon 6, 8 and Xalan XSLT engines, and extensive profiling and backmapping features also. Here is a recent review: http://www.adtmag.co...

Validation of XSD (XML Schema) against XSD
Hi All, I know XSD (XML Schema) is very usefull to validate XML file/fragment. XMLValidator class of .NET is make it very easy for us. But I come here with something new, my question is.... Is it possible to validate a XSD file agaisnt different XSD file? The problem is like this..... A client is generating a Schema file, now we want to check that our client has create proper Schema file or not.....We want to validate client's schema against our schema (they r not identicle, so we don't want to check similarity).... ie. What relation is in between XML and XSD, i want to create same...

How to generate xml using a xml schema in java?
Hi I need some help in generating xml using a valid xml schema in java. I am already doing parsing of an xml request using xerces parser's. Now I need to send xml response back , i have all the fields and values(attribute's) in a HashTable. Thanks Raj ...

Generate an XML in Java using an XML Schema
Hi, Is it possible to create an XML in Java using an XML Schema? Is the XML Schema just for validation? Thanks! V <vmtigno@yahoo.com> wrote in message news:1145378572.065788.33540@u72g2000cwu.googlegroups.com... > Hi, > Is it possible to create an XML in Java using an XML Schema? Is the XML > Schema just for validation? The question isn't entirely clear to me. What you can do is assist the user in creating an XML file, essentially by continuously validating whatever they type against the schema. Another possibility is to analyze the schema, and then generate a mi...

XML + XSD: Is it possible to get all errors against the XSD?
Currenty I'm parsing a XML in this way: .... try { m_builder = new SAXBuilder(a_b_validate); m_builder.setFeature("http://apache.org/xml/features/validation/schema", a_b_validate); m_document = m_builder.build(a_inputStreamXML); m_builder.setErrorHandler(m_SAXErrorHandler); m_rootElement = m_document.getRootElement(); catch (JDOMException e){ System.out.println(e.getMessage()); } ... If a_b_validate = false there is no Exception if the Document is wellformed. If a_b_validate = true and there are errors in the file I get the first occured error in e. Is there a posibil...

Generate an XML in Java using an XML Schema #2
Hi, Is it possible to create an XML in Java using an XML Schema? Is the XML Schema just for validation? Thanks! V On Tue, 2006-04-18 at 09:43 -0700, vmtigno@yahoo.com wrote: > > Is it possible to create an XML in Java using an XML Schema? Is the > XML > Schema just for validation? Well, XML Schema isn't "just" for validation. It defines the structure that a given document may have, which happens to be useful for validation. I use Castor to generate java objects from XSD. Those objects are essentially beans, which can be marshalled or unmarshalled to or from X...

XML schema
Hi. I have a problem witch I assume there is an answear to....? I have several XML schemas, and they all have quiet a lot of definitions in common. They still have to be seperated into different XML schemas, but what I want to do is to create one XML schema containing all the common definitions (this is mostly type definitions). I then want all the XML schemas I have to include this file containing the definitions. How do I do this?... It sounds simple, but I haven't managed to figure out the answear yet... Best regards, Stian stiank81 wrote: > I have several XML schemas, an...

Generate xml node tree from xmi (xml) help
Hi, I am using argouml ( really neat UML modeling tool) to create a model. I export the model to xmi format ( it's xml). My UML-diagram looks like this: Brand A | -------------------- | | | Brand B Brand C Brand D And Brand B, Brand C and Brand D can also have children and so on ......... I need to generate an xml file that can describe these relationships like: <MyModel> <Brand A> <Brand B> </Brand B> <Brand C> </Brand C> <Brand D> </Brand D> </B...

XML generation
The XML DOM implementation extends the XML document object with an "XML" property to retrieve the textual form of the document. This causes my javascript code not to work with Firefox, because the XML DOM standard doesn't have that property. But how else can I get the XML doc's text? Peter Laman wrote: > The XML DOM implementation extends the XML document object with an > "XML" property to retrieve the textual form of the document. This > causes my javascript code not to work with Firefox, because the XML > DOM standard doesn't have that property. B...

Generate XML report using MAX Generate report.vi
Hi All, Caught in simple and wierd problem. I'm using a simle VI called MAX Generate Reoprt.vi to generate an XML report but getting error Error code -2147220553 &nbsp;Error description :Incorrect report file extension provided.The image of the block diagram is attached. I'm able to generate HTML reoport from MAX(absolutely no probs).Thanks in advanceRegardsVDC<img src="file:///C:/DOCUME%7E1/e388739/LOCALS%7E1/Temp/moz-screenshot-8.jpg" alt=""><img src="file:///C:/DOCUME%7E1/e388739/LOCALS%7E1/Temp/moz-screenshot-9.jpg" alt=""> ...