Skip to content

Questions for the entity list #3

Open
@ray-linn

Description

@ray-linn

Thanks a lot for the django-xml, it is pretty nice to work for XML files. and I have 2 questions when keep me in trouble for several weeks, could you help to explain for it?

  1. In your advance exmaple, the element etnries is mapped via following code
    entries = xmlmodels.XPathListField("/atom:feed/atom:entry", required=False)
    then it will return a node_set list to entries field, but how can map as a list of plain object? The plain object looks like
    class entry
    title = xmlmodels.XPathTextFiled("("/atom:feed/atom:entry/atom:title)
    .....
    I tried lxml_extension to map each element as the plain object ,but it reports "This is not a supported node-set result: <entry: entry object>", do you have any solution for this?
  2. is it possible to store the XmlModel back into database after parser the XML?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions