xml - what is the pattern used to set the attributes of an element to a variable to acess it in the javabean using digester -


Setting Room

such as ("root \ subletlements", "xyz");

Where xyz bean has a variable, and how can I set the properties of the element in the variable like bean,

I mean to use it to do this What is the pattern and method for?

  & lt; Student's name = "Javargal" split = "B" & gt; & Lt; Curriculum & gt; & Lt; ID & gt; C3 & lt; / Id & gt; & Lt; Name & gt; EJB & lt; / Name & gt; & Lt; / Course & gt; & Lt; / Student & gt;  

How do I set names and divisions in variables in the beans?

I am parsing an XML file using the digester, where I am sub-elements I set the pattern of bean in the form of pattern

like ("root \ subelements \ subsubelements") "XIs");

I'm not familiar with digester, but if you want to do XPath-based mapping, then it's easily

  @ xmlpit ("root / sublettings / sublettings" ") Some private classes xyz; For example:  
  • For your special example, you can easily use JAXB:

      import javax.xml.bind.annotation. *; @XmlRootElement @XmlAccessorType (XmlAccessType.FIELD) Public class student {@XmlAttribute personal string name; @ XML Attribute Private String Partition; Private course course; }  

    and

      import javax.xml.bind.annotation. *; @XmlAccessorType (XmlAccessType.FIELD) public class course {private string name; Private string id; }  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -