Search code examples
javaapache-commons-digester

Parsing Hyphenated xml Tag


can somebody explain me how to parse hyphenated xml tag using commons digest .i have been searching around the net but no luck help me out in this

<foo id="1">...
    <bar> 
      <foo-ref id="1"/> 
    </bar>
</foo> 

Solution

  • What about this?

    digester.addObjectCreate("foo-ref", "mypackage.FooRef");
    

    http://commons.apache.org/proper/commons-digester/guide/core.html#doc.Usage