shamblett / xml2json

XML to JSON conversion for Dart
MIT License
54 stars 19 forks source link

Unable to obtain complete data #62

Closed helplessness closed 6 months ago

helplessness commented 11 months ago
<Abstract>
  <AbstractText>
      <b>Introduction</b>
      : Transdermal drug delivery has several clinical benefits over conventional routes of drug administration. To open the transdermal route for a wider range of drugs, including macromolecules, numerous physical and chemical techniques to overcome the natural low skin permeability have been developed.
      <b>Areas covered</b>
      : This review focuses on permeation enhancers (penetration enhancers, percutaneous absorption promoters or accelerants), which are chemicals that increase drug flux through the skin barrier. First, skin components, drug permeation pathways, and drug properties are introduced. Next, we discuss properties of enhancers, their various classifications, structure-activity relationships, mechanisms of action, reversibility and toxicity, biodegradable enhancers, and synergistic enhancer combinations.
      <b>Expert opinion</b>
      : Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.
  </AbstractText>
</Abstract>

I am unable to obtain complete data from the above XML format. anyone help me?``

shamblett commented 11 months ago

What transformer are you using?

helplessness commented 11 months ago

What transformer are you using?

use toParkerWithAttrs(),
I can only return data from <b></b>

shamblett commented 11 months ago

If I run this through this online tool, I get -

{
  "Abstract": {
    "AbstractText": {
      "#text": ": Transdermal drug delivery has several clinical benefits over conventional routes of drug administration. To open the transdermal route for a wider range of drugs, including macromolecules, numerous physical and chemical techniques to overcome the natural low skin permeability have been developed.: This review focuses on permeation enhancers (penetration enhancers, percutaneous absorption promoters or accelerants), which are chemicals that increase drug flux through the skin barrier. First, skin components, drug permeation pathways, and drug properties are introduced. Next, we discuss properties of enhancers, their various classifications, structure-activity relationships, mechanisms of action, reversibility and toxicity, biodegradable enhancers, and synergistic enhancer combinations.: Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.",
      "b": [
        "Introduction",
        "Areas covered",
        "Expert opinion"
      ]
    }
  }
}```

Is this what you are expecting?

If you use the GData or Badgerfish transform you get -

{"Abstract": {"AbstractText": {"b": [{"$t": "Introduction"}, {"$t": "Areas covered"}, {"$t": "Expert opinion"}], "$t": ": Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential."}}}



which is sort of like the ffirst example above, basically all the text is concatenated.
helplessness commented 11 months ago

如果我通过这个在线工具运行这个,我会得到 -

{
  "Abstract": {
    "AbstractText": {
      "#text": ": Transdermal drug delivery has several clinical benefits over conventional routes of drug administration. To open the transdermal route for a wider range of drugs, including macromolecules, numerous physical and chemical techniques to overcome the natural low skin permeability have been developed.: This review focuses on permeation enhancers (penetration enhancers, percutaneous absorption promoters or accelerants), which are chemicals that increase drug flux through the skin barrier. First, skin components, drug permeation pathways, and drug properties are introduced. Next, we discuss properties of enhancers, their various classifications, structure-activity relationships, mechanisms of action, reversibility and toxicity, biodegradable enhancers, and synergistic enhancer combinations.: Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.",
      "b": [
        "Introduction",
        "Areas covered",
        "Expert opinion"
      ]
    }
  }
}```

Is this what you are expecting?

If you use the GData or Badgerfish transform you get -

{"Abstract": {"AbstractText": {"b": [{"$t": "简介"}, {"$t": "涵盖领域"}, {"$t": "专家意见"} ], "$t": ": 以有效、临时和安全的方式克服显着的皮肤屏障特性仍然是一个挑战。长期以来,高渗透增强效力一直被认为与此类化合物的毒性和刺激潜力有关,这已成为限制了它们的进一步发展。此外,增强剂与皮肤、制剂和药物相互作用的复杂性,以及它们巨大的化学多样性阻碍了对其作用机制的理解。该领域的最新发展揭示了高效而安全的增强剂或增强剂组合,这表明增强剂辅助的透皮给药尚未充分发挥其潜力。”}}}


which is sort of like the ffirst example above, basically all the text is concatenated.

yep, it is. thanks But after trying all the transformers, they couldn't return such a result. GData and Badgerfish ,The data they returned is incomplete.

shamblett commented 11 months ago

In what way? Please post the output and mark the deficiency.

helplessness commented 11 months ago

In what way? Please post the output and mark the deficiency.

{"Abstract": {"AbstractText": {"b": [{"$t": "Introduction"}, {"$t": "Areas covered"}, {"$t": "Expert opinion"}], "$t": " : Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.\\\\n "}}, "$t": ">"} This is result of toGData(). It seems to have missed the first two pieces of information. Badgerfish's results are the same.

shamblett commented 11 months ago

What do you mean by 'pieces of information' please clearly.mark what is missing from your original input.

helplessness commented 11 months ago

What do you mean by 'pieces of information' please clearly.mark what is missing from your original input.

This is my input content `

Introduction : Transdermal drug delivery has several clinical benefits over conventional routes of drug administration. To open the transdermal route for a wider range of drugs, including macromolecules, numerous physical and chemical techniques to overcome the natural low skin permeability have been developed. Areas covered : This review focuses on permeation enhancers (penetration enhancers, percutaneous absorption promoters or accelerants), which are chemicals that increase drug flux through the skin barrier. First, skin components, drug permeation pathways, and drug properties are introduced. Next, we discuss properties of enhancers, their various classifications, structure-activity relationships, mechanisms of action, reversibility and toxicity, biodegradable enhancers, and synergistic enhancer combinations. Expert opinion : Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.

`

This is my output content {"Abstract": {"AbstractText": {"b": [{"$t": "Introduction"}, {"$t": "Areas covered"}, {"$t": "Expert opinion"}], "$t": " : Overcoming the remarkable skin barrier properties in an efficient, temporary and safe manner remains a challenge. High permeation-enhancing potency has long been perceived to be associated with toxicity and irritation potential of such compounds, which has limited their further development. In addition, the complexity of enhancer interactions with skin, formulation and drug, along with their vast chemical diversity hampered understanding of their mechanisms of action. The recent development in the field revealed highly potent yet safe enhancers or enhancer combinations, which suggest that enhancer-aided transdermal drug delivery has yet to reach its full potential.\\\\n "}}, "$t": ">"} The content of Introduction and Areas covered seems to be missing.

shamblett commented 11 months ago

This was a bug, fix applied to GData and Badgerfish transforms only, package re published at version 6.2.1

helplessness commented 11 months ago

This was a bug, fix applied to GData and Badgerfish transforms only, package re published at version 6.2.1

OK,thanks. it can work. ToParkerWithAttrs() is a very useful transformer. Will there be any updates to toParkerWithAttrs() in the future?

shamblett commented 11 months ago

Not for this update, the Parker transforms work differently to GData and Badgerfish in that they don't support the '$t' notation so there is nothing to extract the text to. Adding this would be too much of a change to existing behaviour which may break these transforms for many users.