commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Axon <Allan.A...@ncmail.net>
Subject matching patterns with or without namespace
Date Thu, 17 Feb 2005 20:51:51 GMT
I'm trying to use the digester with a rules.xml file. The xml file I am 
parsing looks like this:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV ... >
  <SOAP-ENV:Body>
    <Ob xmlns:obns=...>
      <ObProfile>
        <ObPanel att1=...>
....
    </Ob>
  </SOAP-ENV:Body>
</SOAP-ENV:Enveloper>

My patterns look like this "SOAP-ENV:Envelope/SOAP:Body/Oblix/ObProfile" 
when digester.setNamesspaceAware(false). Is this the correct pattern?

Could I use the obns with digester.setNamespaceAware(true) and 
digester.setRuleNamespaceURI(obnsURI) and use a pattern like: 
Ob/Obprofile/ObPanel even though none to the elements in the body have 
<obns:Element> forms. Does this mean the obns namespace is not being 
used or that it applies to everything below the Ob node?

When I run my digester I'm trying to test it by running a public method 
for the ObProfile object and I get a NullPointerException which I assume 
means that my patterns are not matching correctly in the xml file.

Thanks,
Allan Axon
NC DENR

-- 
Allan Axon
Technical Services
Information Technology Services
Department of Environment
      and Natural Resources
V: 919-715-0367
F: 919-715-0357
Allan.Axon@ncmail.net


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message