LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-23-2005, 03:55 PM   #1
jwstric2
Member
 
Registered: Jan 2004
Posts: 105

Rep: Reputation: 15
Question Rule validation techniques for XML


Working on moving data to an XML format, it was kept in Excel docs by my employer . So I'm tryin to figure out how to enforce rules for my XML. The data is pretty loopy, thus hard to enforce strictly in the XML.

Ex.

<Hardware>
<Name>y</Name>
<Interface>x</Interface>
</Hardware>

<Interface>
<Name>x</Name>
</Interface>

I know someone is going to say well really Hardware should contain Interfaces and enforce it through stricter xdt. I thought there may be logic to validate the xml files without strict format, but rather as ex. Interface x needs to exist in my schema for Hardware y.

Jonathan Strickland
 
Old 06-26-2005, 11:32 PM   #2
shakezilla
Member
 
Registered: Jun 2005
Location: U.S.
Distribution: xubuntu 8.10, linux 2.6.27-11-generic
Posts: 78

Rep: Reputation: 16
I have always used xsd for schema validation, you can go to:
http://www.w3schools.com/ if you don't know it.

Don't understand your question, is interface always a
foreign key in hardware? If so, just make a new root element
that is above both interface and hardware. Then interfaces
can be within hardware, or can just be by themselves.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nmap scanning techniques metallica1973 Linux - Security 4 10-24-2005 10:16 PM
Data hiding techniques npuetz Linux - General 4 06-24-2005 01:06 PM
space saving techniques? c_olin3404 Linux - General 2 03-22-2005 04:31 PM
Advanced macro techniques The_Nerd Programming 1 11-15-2004 03:21 PM
Some techniques for text file editing ganninu Programming 17 10-09-2003 05:34 PM


All times are GMT -5. The time now is 05:16 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration