Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can XML Parser find Schema when without access to internet

 
walter wang
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here in my XML file, it defines some name spaces , and schema referred by name space, those schema file, as you can see, are located on internet.
my program XML parser works fine and able to parse those xml element defined in those schema files even without access to internet,

my question is, how can XML parser find those schema files from internet even without access to internet ?

Any hints will be more than welcome!


xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd"
 
g tsuji
Ranch Hand
Posts: 669
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Xml parsers can be categorized, either by nature or by property setting, as validating parser and non-validating parser.
my program XML parser works fine and able to parse those xml element defined in those schema files even without access to internet,
my question is, how can XML parser find those schema files from internet even without access to internet ?

The easiest way to determine the kind of it yourself is to give the xml an element or something not "defined" in any of those schemas. If you can still parser it, the parser you are using is non-validating, otherwise it is validating.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic